Let's have a look at the diagram below.

The blue lines represent the swim leg and the red lines represent the running leg. (The green dot is the start and the orange the finish)
We are trying to find the point along the shore, which I've labeled

, that will result in the minimum time taken.
This mean we need to find time as a function of

.
The total distance that competitor will take is the summation of the swim leg and the running leg.
The distance for the swim leg is given by

(derived in the above picture, using a right angled triangle of with know side lengths of

and

) and the distance for the run leg is

We are given the speeds that each leg can be done at and so we can find the time taken for each leg then add them.
The swim leg has a distance of

and can be done at a speed of 7 km/h, therefore

The running leg has a distance of

and can be done at 16 km/h, therefore

Hence the total time taken is
 = \frac{\sqrt{25 + x^2}}{7} + \frac{8-x}{16})
We want to find the minimum of this function i.e. the value of

for which
 = 0)
, which will calculate to approximately 2.43km.
edit: removed an unfinished sentence that I accidentally left in there, awks
