distance = rate * time
Edna, due east, d1 = (4 km/hr)(4 hrs) = 16 km
Nancy, due north, d2 = (3)(4) = 12 km
They walked in lines that are perpendicular, so the the straight line, d3, between them forms the hypotenuse of a right triangle.
By Pythagorean theorem,
(d3)^2 = (d1)^2 +(d2)^2
(You should find d3 = 20 km)