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).