The circumference of a circle is 2πr where r is the radius and π is 3.14159265358979323846264338327950288419716 (approximately).
Therefore, if you are going to fly through 20 degrees of arc on a 12 dme arc, you will fly (2π x 12 x 20)/360 = 4.2 nm approx.
The formula can be simplified to (radius x arc)/60.
In your example, the distance flown is 22.5 miles. Using a closer approximation for π, we get 23.561946 nm, but the first is probably good enough for government work!