Track each process by the total time it sits idle waiting for the CPU, since with equal arrival at 0 waiting time is just the sum of gaps before and between its runs.
The round-robin order of 4 ms quanta is A, B, C, D, then A finishes its last 1 ms, then B its last 3, then D twice.
Segment ends: A done at 17, B done at 20, C done at 12, D done at 25.
Waiting = finish - own burst:
$A = 17 - 5 = 12$
$B = 20 - 7 = 13$
$C = 12 - 4 = 8$
$D = 25 - 9 = 16$
Sum the waits and divide by four processes.
$$\text{Avg} = \frac{12 + 13 + 8 + 16}{4} = \frac{49}{4}$$\[\boxed{12.25 \text{ ms}}\]