From the information given, the expression for the distance of the ship from the origin will be given by cosine rule:
c^2=a^2+b^2-2ab Cos C
From the information given:
c=distance from the origin
a=x, b=y, C=180-25=155
hence
c^2=x^2+y^2-2*x*ycos155
thus
c^2=x^2+y^2-2xycos155
hence to get c we get the square root of the above.
c=sqrt(x^2+y^2-2xycos155)