The initial conditions are represented by an isosceles triangle ASB where S is the initial position of the ship.
If we drop a perpendicular from S to N on AB, then SN is the height of the triangle and AN=BN=3km, AS=BS=5km so:
SN2=AS2-AN2=25-9=16, making SN=4km. Position of the ship is 3km East of A (3km West of B) and 4km North of A and B.
Let's assume that the ship is moving with constant speed v and direction from point S. If the angle of direction is θ as measured on the easterly line AB then after a time t hours the ship reaches a point P. The distance of the ship from A is AP and from B is BP. SP=vt. Point P will be vtsinθ further north than S and vtcosθ further east. This puts the ship vtsinθ+4 km north of both A and B.
The ship at P is vtcosθ+3 km east of A and vtcosθ-3 km east of B.
AP2=(vtcosθ+3)2+(vtsinθ+4)2=v2t2cos2θ+6vtcosθ+9+v2t2sin2θ+8vtsinθ+16,
AP2=v2t2+6vtcosθ+8vtsinθ+25.
BP2=(vtcosθ-3)2+(vtsinθ+4)2=v2t2-6vtcosθ+8vtsinθ+25.
The rate of change of AP is given as 28km/h and that of BP as 4km/h.
Let a=AP and b=BP, then 2ada/dt=2v2t+6vcosθ+8vsinθ, 2bdb/dt=2v2t-6vcosθ+8vsinθ.
ada/dt=v2t+3vcosθ+4vsinθ, bdb/dt=v2t-3vcosθ+4vsinθ.
da/dt=28, db/dt=4. ada/dt-bdb/dt=6vcosθ, 28a-4b=6vcosθ, 14a-2b=3vcosθ.
[We can also use the Cosine Rule on the two triangles ASP and BSP.
AS=BS=5km. AŜP=180-(φ-θ), BŜP=φ+θ, where tanφ=4/3 (sinφ=⅘, cosφ=⅗). SP=vt.
a2=AP2=52+v2t2+10vtcos(φ-θ), b2=BP2=52+v2t2-10vtcos(φ+θ).
2ada/dt=2v2t+10vcos(φ-θ), ada/dt=v2t+5vcos(φ-θ); bdb/dt=v2t-5vcos(φ+θ).
28a=v2t+5vcos(φ-θ); 4b=v2t-5vcos(φ+θ). When the compound angles are expanded we get the same equations as before.]
But this rate of change is constant and starts at t=0 when the ship leaves point S.
Plugging in t=0, a=b=5. So 28a=140=5vcos(φ-θ) and 4b=20=-5vcos(φ+θ).
vcos(φ-θ)=28, vcos(φ+θ)=-4; vcosφcosθ+vsinφsinθ=28, vcosφcosθ-vsinφsinθ=-4.
2vcosφcosθ=24, 2v(⅗)cosθ=24, vcosθ=20; 2vsinφsinθ=32, 2v(⅘)sinθ=32, vsinθ=20.
vsinθ/vcosθ=tanθ=1, θ=π/4 (45°). v2sin2θ+v2cos2θ=v2=800, v=20√2 km/h.
The position of the ship initially: 3km East of A (3km West of B) and 4km North of A and B.
Speed: 20√2=28.28km/h approx.
Direction: northeast: 45° north of east.