I have two points defined: $A$ and $B$
For both I know $x,y$, longitude, and latitude (gps coordinates). How do I calculate $x,y$ of a third point $C$ when I know its longitude and latitude?
I know this is very basic but I cannot get my head around it at the moment.
Edit: I want a basic math proportion calculation, without taking into consideration Earth's surface and how coordinates is calculated.
Edit: I think I figured it out. (Can't answer my own question yet) for $x$: $$\frac{|lon_A-lon_B|}{|lon_C-lon_A|} = \frac{|x_A-x_B|}{|x_C-x_A|}$$
This isn't an answer but I found your question interesting and wanted to share some of my ideas.
There are many different projections from the earth to an x-y plane. See: http://en.wikipedia.org/wiki/Map_projection. So my first suggestion, if you know or can guess the 'center' of the projection, would be to try plugging the points you have into some of the equations given for some common projections (these can be found on their respective wiki pages). Alternatively, if you know the type of projection you could derive the center easily and that would solve your problem.
If you wanted to try to derive the projection yourself, you need at least 3 non-collinear points to describe the projected plane. From there you could try experimenting with different functions to see if one gives a good fit.