How to find the original coordinates of a point inside an irregular rectangle?
This is what the concept of a homography was invented for.  You know the coordinates of the four corners on your screen and on the wall, and you want to find a transformation that maps from screen coordinates to wall coordinates.  There will be a homography that maps between the two coordinate systems.  So, your task is: given four points with known mappings, find a homography that is consistent with that.

If you're using OpenCV, see the findHomography() method, as well as warpPerspective().