Figure Out Direction of Plane (Heading) — Slightly Complicated? Bearing = Measured from Due North ($310^\circ$ bearing = $140^\circ$)
We are given the following — a plane departs from airport LAX to SFO at an air speed of 750 km/hr at 12:00 AM, with airport SFO bearing $310^\circ$ from LAX. Airport SFO is 540 km away from airport LAX. A wind blows 90 km/hr at a bearing of $75^\circ$
1.) What is the heading the airplane needs to depart at in order to travel towards SFO? (meaning $V_{airplane}$ + $V_{wind}$ should have a bearing of $310^\circ$, or angle measure of $140^\circ$)
2.) What time will the plane arrive at SFO?
I cannot for some reason achieve an answer of a bearing of $304.4^\circ$.
My reasoning --
We can first write the following equations:

$750\cos(140 + \theta) + 90\cos(15) = |V_{airplane}|\cos(140)$ and $750\sin(140 + \theta) + 90\sin(15) = |V_{airplane}|\sin(140)$

Dividing the respective equations by cos(140) and sin(140) will yield:

$\frac{750}{\cos140}\cos(140 + \theta) + \frac{90\cos(15)}{\cos140}= |V_{airplane}|$ and $\frac{750}{\sin140}\sin(140 + \theta) + \frac{90\sin(15)}{\sin140}= |V_{airplane}|$

Therefore, we can now assume that

$\frac{750}{\cos140}\cos(140 + \theta) + \frac{90\cos(15)}{\cos140}= \frac{750}{\sin140}\sin(140 + \theta) + \frac{90\sin(15)}{\sin140}$

Seeing that there are 4 constants in the above equation, we will now define

$\frac{750}{cos140} = A$, $\frac{90cos15}{cos140} = B$, $\frac{750}{sin140} = C$, and $\frac{90sin15}{sin140} = D$.

Slightly manipulating the equation will yield:

$-C\sin(140 + \theta) + A\cos(140 + \theta) = D - B$

Utilizing the fact that $k\sin(\theta + \phi) = A\sin(\theta) + B\cos(\theta)$, where $k = \sqrt{A^2+B^2}$, we can rewrite the above as

$k = \sqrt{-C^2+A^2}$
$k\sin(\theta + 140 + sin^{-1}\frac{A}{K}) = D - B$

Therefore,

$\theta = sin^{-1}\frac{D-B}{K} - sin^{-1}\frac{A}{K} - 140$

which yields the extremely incorrect answer of $-94.42^\circ$, or $234.42^\circ$ bearing.
I was wondering where the fault in my logic is, or if there is simply a better way to do this?
Thanks for all replies!
 A: One way to solve this type of problem is to take the three vectors involved (plane speed, wind speed, and the resultant ground speed), and resolve them into $X$ and $Y$ components.  You then get two equations:  $$X(\text{plane}) + X(\text{wind}) = X(\text{ground speed})$$ and$$ Y(\text{plane}) + Y(\text{wind}) =Y(\text{ground speed})$$
However, in this case, the equations are rather complicated to solve
It's much simpler to first, select a new rotated set of axes.
Consider the resultant ground speed, one of the unknowns.  Rotate the co-ordinate axes by adding the same offset angle to the direction of each of the three vectors (even the one that you don't know, the heading flown).
Your goal is to make the direction of the resultant ground speed either 0 or 90 or 180 or 270, thus making the sine or cosine of the ground speed direction exactly zero.  Then you'll have either the X or Y equation with only one unknown.
Solve the system of equations to find the ground speed size and air speed direction.  Don't forget to un-rotate the axes by subtracting the offset you added...
Assuming that the wind is blowing towards a bearing of 75, the first try would look like this:

So solving Plane + Air = Result for both x and y involves two equations, each with R and a different trig ration of A.  Messy...
However, if you subtract 140 from each angle, one gets

Note unknown angle changes name, since it's measured from the new axes.
Now the y-equation has only one unknown.  Solve for B, pop the value of B in the X-equation, then add 140 to B to get A, and you're done...
