Im trying to code a small conversion program but i cannot seem to get the math correct.

Here it goes:

I have 2 coordinate systems:

1) a simple x,y system (or North,East)

2) an a,b system

For this purpose lets say the angle is 8.48024896816733

So we know the

*angle

*x,y coordinates at origin (1994490,185846) and at top right corner (2083409.26,249077.0332)

*the a,b coordinates at origin (0,0)

I need to solve for the a,b coordinates of the top right corner

Heres the problem drawn out:

Any help would be very appreciated. Thank you all.