Let x = the distance from point B east to point Q.
The distance form the island house, H, to point Q is the hypotenuse of the right triangle HBQ.
dHQ = √(x2 + 62)
The distance from point Q to the the Water, W, is:
dQW = 8-x
C(x) = 8000√(x2 + 36) + 5000(8-x)
To find the minimum cost, take the derivative of C(x), set that to zero and solve for x.
C'(x) = 8000(2x)/(2√(x2 + 36)) - 5000x
8000x/√(x2 + 36) - 5000 = 0
8000x = 5000√(x2 + 36)
8x/5 = √(x2 + 36)
Squaring both sides
64x2/25 = x2+36
39x2/25 = 36
x = 6√(25/39) = 30√(1/39)≈4.8 miles east of point B
Note: C(4.8) ≈ $77470