The parametric equations for the ellipse
$$ \dfrac{ (x - h)^2}{a^2} + \dfrac{ (y - k)^2}{b^2} = 1 $$
are:
$ x = h + a \cos t $
$ y = k + b \sin t $
The tangent vector is $( - a \sin t, b \cos t ) $, therefore the normal vector is
$ (b \cos t , a \sin t ) $
Hence we want to find $s$ such that
$ (h + a \cos t , k + b \sin t ) + s (b \cos t, a \sin t ) = (x', y') $
It follows that $s$ is given by
$ s = \dfrac{ x' - h - a \cos t }{ b \cos t } = \dfrac{ y' - k - b \sin t }{a \sin t } $
Cross multiplying, gives us,
$ a \sin t ( x' - h - a \cos t ) - b \cos t ( y' - k - b \sin t ) = 0 $
This equation is of the form
$ A \cos t + B \sin t + C \cos(2 t) + D \sin(2 t) + E = 0 $
where
$A = - b (y' - k)$
$B = a (x' - h) $
$ C = 0 $
$ D = \dfrac{1}{2} ( - a^2 + b^2 ) $
$ E = 0 $
The standard way to solve this equation it to introduce the transformation $ z = \tan \dfrac{t}{2} $, then it follows that
$ \cos t = 2 \cos^2 \dfrac{t}{2} - 1 = \dfrac{2}{z^2 + 1} - 1 = \dfrac{1 - z^2 }{1 + z^2} $
And similarly,
$ \sin t = 2 \cos \dfrac{t}{2} \sin \dfrac{t}{2} = 2 \cos^2 \dfrac{t}{2} \tan \dfrac{t}{2} = \dfrac{2z}{z^2 + 1} $
Using the above, we can find expressions for $\sin(2 t)$ and $\cos(2 t)$, namely
$ \sin(2 t) = 2 \sin t \ \cos t = \dfrac{ 4 z (1- z^2) }{(1 + z^2)^2} $
and
$ \cos(2 t) = 2 \cos^2 t - 1 = 2 \left( \dfrac{1 - z^2}{1 + z^2} \right)^2 - 1 = \dfrac{z^4 - 6 z^2 + 1 }{(1 + z^2)^2} $
Substituting these expressions in to the equation and multiplying through by $(1 + z^2)^2 $ results in a quartic (degree $4$) polynomial in $z$, which can be solved using the quartic polynomial roots formula, or numerically. Once the $z$-roots are found, the angle $t$ corresponding to each root $z$ is computed as $ t = 2 \tan^{-1} z $.