The parameters of the rotation you describe are
Tait-Bryan angles.
Exactly what rotation they represent depends on several things:
the sequence in which you apply the rotations, whether they are
intrinsic (body-axis) or extrinsic (fixed-axis) rotations,
whether you have a "right-handed" or "left-handed" set of $x,y,z$ axes,
and whether a positive rotation angle represents a
"right-handed" or "left-handed" rotation around each axis.
A typical setup might be as follows: using a right-handed coordinate system
and using a positive angle to represent any right-handed rotation,
perform intrinsic rotations first around the $z$-axis through an angle $\gamma$,
then around the (rotated) $y$-axis of the body through an angle $\beta$, and
finally around the (twice-rotated) $x$-axis of the body through an angle $\alpha$.
Since you also want the center of the body to be offset from the origin of
coordinates, after performing the rotations we will translate the entire
body by the same translation that takes $(0,0,0)$ to $(x_0,y_0,z_0)$.
If $(x',y',z')$ are the coordinates of a point on the body prior to rotation,
and $(x,y,z)$ are the coordinates of the image of that point after rotation
and translation, then
$$
\begin{pmatrix} x \\ y \\ z \end{pmatrix}
= R_z(\gamma)R_y(\beta)R_x(\alpha) \begin{pmatrix} x' \\ y' \\ z' \end{pmatrix}
+ \begin{pmatrix} x_0 \\ y_0 \\ z_0 \end{pmatrix}
$$
where
$$
R_x(\alpha) =
\begin{pmatrix} 1 & 0 & 0 \\
0 & \cos\alpha & -\sin\alpha \\
0 & \sin\alpha & \cos\alpha \end{pmatrix}, \quad
R_y(\beta) =
\begin{pmatrix} \cos\beta & 0 & \sin\beta \\
0 & 1 & 0 \\
-\sin\beta & 0 & \cos\beta \end{pmatrix}, \quad\text{and}
$$
$$
R_z(\gamma) =
\begin{pmatrix} \cos\gamma & -\sin\gamma & 0\\
\sin\gamma & \cos\gamma & 0 \\
0 & 0 & 1 \end{pmatrix}.
$$
(Yes, that means the rotation matrix for angle $\alpha$ around the $x$-axis
is applied first. The use of intrinsic rotations rather than extrinsic
rotations causes the sequence of matrix multiplications to be reversed.)
If the original coordinates of all points on a body satisfy the equation
$f(x',y',z') = 0$,
then in order to find an equation satisfied by the image of that body
after the rotation and translation described above,
we first write
$$
\begin{pmatrix} x' \\ y' \\ z' \end{pmatrix}
= R_x(-\alpha) R_y(-\beta) R_z(-\gamma)
\begin{pmatrix} x - x_0 \\ y - y_0 \\ z - z_0 \end{pmatrix}.
$$
After fully working out the matrix multiplications on the right-hand side,
the result is a column vector in which each element is some function
of $x$, $y$, $z$, $x_0$, $y_0$, $z_0$, $\alpha$, $\beta$, and $\gamma$.
That is, we now have each of the coordinates $x'$, $y'$, and $z'$
of a point of the the unrotated, untranslated object
(on the left-hand side of the vector equation)
expressed in terms of the coordinates $x$, $y$, and $z$
of the rotated and translated image of the object,
along with parameters of the rotation and translation.
We can use these equations to substitute for $x'$, $y'$, and $z'$
in the equation $f(x',y',z') = 0$,
resulting in a new equation, $g(x,y,z) = 0$.
This is assuming that you perform the rotation and translation exactly
as described in the paragraph about "a typical setup".
Depending on exactly how you actually perform your rotation and translation,
you may have to change the order in which the matrix/vector operations are performed, or you may have to reverse the signs of some angles in the matrices, or both.
Then if you want an equation that determines a rotated and translated
ellipsoid, develop the equations for $x'$, $y'$, and $z'$ in terms of $x$, $y$, $z$, and the parameters of the rotation and translation, according to the
formulas above or whatever variation of them is appropriate to your particular
rotation and translation,
and use these equations to substitute for $x'$, $y'$, and $z'$ in
$$
f(x',y',z') = \frac{x'^2}{a^2} + \frac{y'^2}{b^2} + \frac{z'^2}{c^2} - 1 = 0.
$$
The resulting equation in $x$, $y$, and $z$ is the equation of
the rotated, translated ellipsoid.
You could further "simplify" the equation by multiplying out the squared
expressions and recombining terms into a more standard polynomial form
with terms in $x^2$, $y^2$, $z^2$, $xy$, $yz$, $xz$, $x$, $y$, $z$, and
a constant, but I think that would obscure the meaning of the equation
(namely, that it describes an ellipsoid) and might not be desirable.
I believe there is an error in the formula for the distance.
If $(x_1,\cdots,x_n)$ is your point on the ellipsoid, we can find a vector orthogonal to the ellipsoid by taking the gradient of the function
\begin{equation}
F = \frac{x_1^2}{a_1^2}+\frac{x_2^2}{a_2^2}+\cdots+\frac{x_n^2}{a_n^2}-1
\end{equation}
so we'll have
\begin{equation}
\nabla F =2 \left(\frac{x_1}{a_1^2},\frac{x_2}{a_2^2},\cdots,\frac{x_n}{a_n^2}\right)
\end{equation}
The distance of the tangent plane from the origin can be found by finding a number $\lambda$ such that $\lambda\nabla F$ belongs to the plane. In this way you'll get that the distance is $\|\lambda\nabla F\|$.
In particular, we have that
\begin{equation}
y_i=2\lambda\frac{x_i}{a_i^2}
\end{equation}
so we should solve
\begin{equation}
2\lambda\left(\frac{x_1^2}{a_1^4}+\frac{x_2^2}{a_2^4}+\cdots+\frac{x_n^2}{a_n^4}\right)-1=0
\end{equation}
which yelds
\begin{equation}
\lambda=\frac{1}{2}\left(\frac{x_1^2}{a_1^4}+\frac{x_2^2}{a_2^4}+\cdots+\frac{x_n^2}{a_n^4}\right)^{-1}
\end{equation}
Now,
\begin{equation}
\|\lambda\nabla F\|=\lambda\|\nabla F\|=\lambda \cdot 2\left(\frac{x_1^2}{a_1^4}+\cdots+\frac{x_n^2}{a_n^4}\right)^{1/2}
\end{equation}
so
\begin{equation}
\|\lambda\nabla F\|=\frac{1}{2}\left(\frac{x_1^2}{a_1^4}+\cdots+\frac{x_n^2}{a_n^4}\right)^{-1}\cdot 2\left(\frac{x_1^2}{a_1^4}+\cdots+\frac{x_n^2}{a_n^4}\right)^{1/2}=\left(\frac{x_1^2}{a_1^4}+\cdots+\frac{x_n^2}{a_n^4}\right)^{-1/2}
\end{equation}
Best Answer
A hint :
In fact, your 3D issue can be reduced to a 2D issue, by vertical projection onto the x-y plane.
I.e., by taking $z=0$, it is the same as finding the equations of the tangents to the ellipse with equation :
$$\dfrac{x^2}{32} + \dfrac{y^2}{18} = 1$$
issued from exterior point : $$(12,-3)$$.
Here is a graphical representation:
Is this hint sufficient ?