Step 1 — median class.
The median 75 lies in 60–90, so this is the median class.
n=8+x+20+14+6=48+x
l=60,h=30,f=20,cf=8+x
Step 2 — substitute in the median formula.
75=60+(20248+x−(8+x))×30
15=23(24+2x−8−x)⇒10=16−2x⇒x=12
Step 3 — total.
n=48+12=60
So x=12 and there were 60 cars.
Check: 2n=30; cumulative frequencies are 8,20,40,…, so 60–90 is indeed the median class, and
Median=60+2030−20×30=60+15=75 ✓