Observe the figure :
and 
For a right angle triangle :
\Let
and
.
Consider the trigonometric functions:
and
.
Substitute
,
and
.


.
Therefore,
.
Find Distance between
and
.
is opposite side of the right angle triangle.
So,
.
Substitute
,
and 



Distance from
to
is
.
Distance from
to
is
.