If I understand your question correctly, the displacement should be 2 kilometers north since he went north 7km and back 5km south resulting in a net change of 2km
this is different than distance which is total amount moved instead of net amount moved. (in this case the distance would be 12km)