Correct option is B
Given:
Shyam starts from Point A and drives 12 km east.
He then takes a right turn and drives 7 km.
He then turns right and drives 5 km.
He then takes a left turn and drives 9 km.
He takes a final right turn and drives 7 km to stop at Point P.
According to the given information, Path diagram will be:

As per the diagram, he drive 16 KM towards north in order to reach Point A again.
Thus, the correct option is (B) 16 km towards north