What airspeed and direction should an airplane maintain in order to continue having a ground speed of 800 km/h and a direction of 140° with wind at 130 km/h at 27°?

800 @ 140° = <514,-613>

130 @ 27° = <59,116>

So, you want <x,y> such that

<x,y>+<59,116> = <514,-613>

Once you have x and y, then convert back to speed and heading.