Let the initial position be at the origin with coordinates (0,0).
The girl walks 20 meters North:
Position: (0,20)
Direction: North
She turns left (now facing West) and walks 50 meters:
Position: (0−50,20)=(−50,20)
Direction: West
She turns right (now facing North) and walks 40 meters:
Position: (−50,20+40)=(−50,60)
Direction: North
She turns right again (now facing East) and walks 50 meters:
Position: (−50+50,60)=(0,60)
Direction: East
The distance from her initial position (0,0) to final position (0,60) is:
d=(0−0)2+(60−0)2
d=0+3600
d=3600
d=60 meters
Therefore, she is 60 meters from her initial position.