Composition of Euler angles is not simple.
Convert your Euler-angles to rotation matrices, and multiply them together.
R1 = rotate 90° around y-axis — Rotates to left side
R2 = rotate 14° around x-axis
R3 = rotate -14° around y-axis
R4 = rotate -32° around z-axis
R = R4 × R3 × R2 × R1
Recover the angles
x' = arctan2(R3,2,R3,3) = arctan2(cos(y)·sin(x), -sin(y))
y' = -arcsin(R3,1) = -arcsin(cos(y)·cos(x))
z' = arctan2(R2,1,R1,1) = arctan2(cos(z)·sin(x) - sin(z)·sin(y)·cos(x), -sin(z)·sin(x) - cos(z)·sin(y)·cos(x))
In your specific case, this evaluates to:
x' = 44.1°
y' = 70.3°
z' = 13.9°
I would guess that you're supposed to use "homogeneous coordinates", and that the "3D" matrix you're supposed to compute is the matrix of a projective transformation. When we use homogeneous coordinates, a coordinate vector for a point in a plane has three components rather than two. This may seem unintuitive or unappealing, but there are advantages to homogeneous coordinates: 1) "points at infinity" can be assigned coordinates as easily as ordinary points ; 2) every projective transformation is given by multiplication by a $3 \times 3$ matrix. (There are other advantages too; mathematicians have discovered that homogeneous coordinates are a natural and elegant way to assign coordinates to points in a projective plane.)
Suppose we have a projective transformation that is represented by a matrix $H \in \mathbb R^{3 \times 3}$, so that point with coordinate vector $x$ maps to a point with coordinate vector $Hx$. If we have four points $x_1,\ldots,x_4$ in "general position" and we know these four points map to $y_1,\ldots, y_4$, then we can use this information to compute $H$.
We cannot simply say that $y_i = H x_i \, \,$, because one quirky thing about homogeneous coordinates is that if $y$ is a coordinate vector for a point in a projective plane, then any nonzero scalar multiple of $y$ is also a coordinate vector for the same point. This might seem weird but it's something we must get used to.
The most we can say is that $y_i$ is a (nonzero) scalar multiple of $H x_i$. An equivalent way to say the same thing is
\begin{equation}
y_i \times H x_i = 0
\end{equation}
where $\times$ denotes the cross product.
Notice that this equation is linear in the components of $H$ ! For each $i$, we have three linear equations for the components of $H$. However, it turns out that one of those three equations is redundant, so each $i$ really only gives us two equations. All together, we have eight linear equations.
$H$ is found by finding a nonzero solution of this system of eight equations. Note that this only determines $H$ up to a scalar multiple. However, that's to be expected, because in homogeneous coordinates, any nonzero scalar multiple of $H$ represents the same projective transformation as $H$.
Best Answer
Given the four points of the transformed rectangle, you can compute 2D perspective transform by solving system of eight linear equations.
The stability of the solution depends on coordinate system, precision of point locations and distance from nearest degenerate configuration.
A method proposed by Hartley & Zisserman (Multiple-View Geometry) is thus a Normalized Direct Linear Transformation, which does preconditioning prior to solving the linear equations (the preconditioner is basically an affine transform that maps coordinates of two quadrilaterals into common frame and scale).
Note that linear solution of the problem minimizes only algebraic distance and has little geometrical meaning. Iterative solution with geometric cost function (e.g. symmetric transfer error) should be considered in presence of noise. This essay may be helpful.
You can find more under the keywords "homography estimation".