I'm currently making a game and have run into a problem I'm not quite sure how to solve, I'll try to lay it out as a maths question. None of the values are fixed, so I'm looking for an equation that solves the below question:
A plane lies on the position vector p0 <x0, y0, z0> and has a normal unit vector n <a, b, c>.
Given a sphere with a radius of R forms a tangent with the plane at an unknown position vector t <tx, ty, tz>:
Find the highest height of the center of a sphere, when the sphere is located at the position vector s <sx, sy, sz>, and sx and sz are known values, but sy is not.
The known vectors are p0, n, and the other known values are sx, sz, and R. The position vector t is unknown, and the height of the sphere sy is also unknown. Should it be necessary, another point on the plane p1 <x1, y1, z1> can be provided.
In my case, the Y axis is the up axis, the Z axis is the forward axis, and the X axis is the right axis.
I wanted to essentially do something similar to what is shown in this video, but in my case I know the length of the vector but not the positions: https://www.youtube.com/watch?v=zWMTTRJ0l4w
Here is 2d visualisation of the problem:

I was only able to find the positions due to trial and error, but these were approximately correct.
Here is what I do know:
The vector t to s will have the same direction as the normal vector, but with the magnitude being equal to R. It could then be defined as Rn, given that n is a unit vector.
Given that, the vector could be defined as a translation of the vector Rn along the plane.
Beyond this point, I am a little confused, so any help would be appreciated. I would prefer to avoid cartesian form, and values can be stored in variables at later dates if necessary. I have v1:Dot(v2) and v1:Cross(v2) methods available to me, and I expect this probably will use the dot product at some point.
Thank you.
Given
$$R, \ \ \cases{ \vec p_0 = (x_0,y_0,z_0)\\ \vec n = (n_x,n_y,n_z)\\ \vec s = (s_x,u,s_z)\\ } $$
determine $\vec t=(t_x,t_y,t_z),\ u,\ \lambda$ such that
$$ \cases{ (\vec t-\vec p_0)\cdot \vec n = 0\\ \|\vec t - \vec s\|^2 = R^2\\ \vec t-\vec s = \lambda \vec n } $$
five equations and five unknowns $t_x,t_y,t_z,u,\lambda$.
NOTE
One solution is
$$ \cases{ t_x = s_x + \frac{R n_x}{\|\vec n\|}\\ t_y = \frac{1}{n_y}\left(n_x(x_0-s_x)+n_y y_0+n_z(z_0-s_z)-\frac{(n_x^2+n_y^2)R}{\|\vec n\|}\right)\\ t_z = s_z + \frac{R n_z}{\|\vec n\|}\\ u = \frac{1}{n_y}\left(n_x(x_0-s_x)+n_yy_0+n_z(z_0-s_z)-\|\vec n\|R\right)\\ \lambda = \frac{R}{\|\vec n\|} } $$