Since both are facing east, one is towards north and other is towards south and distance between them is x.
now both of them started moving in 45 degree direction with a speed of 20kmph for 30 mins so they have moved 10 kms.
at this point, both of them met.
if we consider the midpoint of their initial positions, their starting position and current position, we get a right agled triangle and they have walked on the hypotenuse.
hypotenuse = side sqrt(2)
side = 10/sqrt(2)
but we need x which is 2 side
so x= 10*sqrt(2) = 14.14