How to transform point in 2d into 3d? This is not a homework, I simply have to write some code and it appears my math skills are a bit rusty ;-).
What I have: main point in 2d of the 2d surface, and main point counterpart in 3d plus the normal vector to the 3d surface. I also have 3d counterpart of (0,1) vector from 2d.
My input is some point in 2d and my objective is to compute its coordinates in 3d. How to do it?
If you wonder what is it -- it is quite simple, I have my screen, as usual, the user clicks on the screen, so I have my (x,y) for the mouse coordinates and I have to take the screen surface and shift+rotate it in 3d to get the center of screen located in the "main" point (camera) in 3d and then find out the coordinates of the mouse click in 3d on this rotated surface. 
This would give infinite number of solutions, but I also have given the 3d counterpart of (0,1) vector and the normal vector to the 3d surface (the direction of view) so it should be doable (I mean with 1 outcome).
 A: I assume that by “surface” you actually mean plane.
You can compute the cross product between the image of the $(0,1)$ vector and the normal vector of the 3d plane. That will be a vector orthogonal to both, which you can then consider as the image of the $(1,0)$ vector.
You can then interpret each point $(x,y)$ in the plane as $x\cdot(1,0)+y\cdot(0,1)$ and translate this to 3d as $v_0 + x\cdot v_x + y\cdot v_y$. If your “main points” are not the origin of their respective coordinate system, you'd first subtract the 2d “main point”, then do the above conversion to 3d, then add the 3d “main point”. All of this would establish a Cartesian coordinate system on a given plane in 3d.
The “main point” in 3d should however not be the location of the camera, but should instead be a point on the plane. And if your coordinates are coordinates as seen by the camera, then a simple Cartesian coordinate system is not what you need. Instead you'd have to take care of perspective deformations. For that you'd need more information than you provided.
