i think here some explanation should also need to add like angle NOP = 45 . so that the
sin45 = perpendicular / hypotanouse
= > perpendicular i.e. a= 1/root 2
and also
cos45 = base / hypotanouee
= > base . = 1/root 2
so that required distance to get solution is ( 2- 1/root 2)