and
are velocities.
The angles are
and
.
Draw a diagram.
\
Observe the diagram :
\Here
and 

Time
.
Here the time is considered for both the man can row in water and walking time.
\
Differetiate with respect to
.

Equate
to zero.

Substitute
and
in the above equation.
.
Thus, least time taken by light waves travelling from
to
is
.

Differetiate with respect to
.

Thus, the time is minimum time.
\ Least time taken by light waves travelling from
to
is
.