ANSWER:
39.21 km
Explanation:
To determine the answer we track each move just like this:
Coordinates at the start (city A): (0, 0)
Coordinates after going 30 km north: (0, 30)
Coordinates after going 50 km west: (-50, 30)
Southeast is a move down and to the right of 45°, so we calculate at each coordinate, like this:
![\begin{gathered} d_e=20\cdot\cos45\degree=10√(2) \\ \\ d_s=20\cdot\sin45\operatorname{\degree}=10√(2) \\ \\ \text{ Therefore:} \\ \\ x=-50+10√(2)=-35.86 \\ \\ y=30-10√(2)=15.86 \\ \\ \text{ Coordinates at the start \lparen city B\rparen: \lparen-35.86, 15.86\rparen} \end{gathered}]()
We calculate the distance between both points as follows:

The distance between both cities is 39.21 km