Then it takes 2x/(60+4)=x/32 hours for this car to leave for C and then return to meet the people in Group A,
Then there is
x/32+( 18-4 * x/32)/60 = x/60+( 18-x)/4
Get x= 16.
Then the distance from AC to Shanghai is 16km.
People in group A walk 4 * 16/32 = 2km, and people in group B walk 18- 16 = 2km.