Alternative approach.
It is assumed that $c$ is the hypotenuse, that $a$ is the side opposite the angle $\alpha$, and that the value $(a+b-c)$ equals a given fixed value $T$.
Then, you have the following two equations in the two unknowns, $a,b$.
- $c^2 = (a + b - T)^2 = a^2 + b^2.$
- $\displaystyle \frac{a}{b} = \tan(\alpha)$.
Here, I am assuming that since $\alpha$ is known, that $\tan(\alpha)$ is known.
Once $a,b$ are solved, then $c$ is immediately solved by $a + b - c = T.$ Therefore, the problem reduces to using the above two equations to solve for $a,b$.
Using the first equation above, you have that
$$T^2 + 2ab = 2T(a+b). \tag1 $$
Let $R = \tan(\alpha).$
This implies that
$$a = bR \tag2 .$$
Using (1) and (2) above, you have that
$$T^2 + 2Rb^2 = 2Tb(R+1) \implies$$
$$b^2(2R) - b(2T[R+1]) + T^2 = 0. \tag3 $$
(3) above represents a quadratic in $b$. Therefore,
$$b = \frac{1}{4R}\left[2T(R+1) \pm \sqrt{[2T(R+1)]^2 - 8RT^2}\right]. \tag4 $$
(4) above simplifies to
$$b = \frac{T}{2R}\left[(R+1) \pm \sqrt{R^2 + 1}\right]. \tag5 $$
Temporarily, both roots in (5) will be carried, until $c$ is evaluated. Since $c$ must be $> 0$, one of the roots will then be eliminated.
$$a = \frac{T}{2R}\left[(R+1) \pm \sqrt{R^2 + 1}\right] \times R. \tag6 $$
Using that $c = a + b - T$, this implies that
$$c = \frac{T}{2R}\left[(R^2+1) \pm (R+1)\sqrt{R^2 + 1}\right]. \tag7 $$
At this point, since $R > 0 \implies \sqrt{R^2 + 1} < (R+1)$
you can infer that the smaller roots in (5), (6), and (7) are inappropriate.
You can then manually verify that the resulting values for $a,b,c$ satisfy $a^2 + b^2 = c^2.$
Edit
After reading the answer of Grab a Coffee, I was intrigued enough to sanity-check my answer.
$\displaystyle R = \frac{\sin(\alpha)}{\cos(\alpha)} \implies $
Therefore,
$$c = \frac{T}{2} \times \frac{\cos(\alpha)}{\sin(\alpha)} \times
\left[\frac{1}{\cos^2(\alpha)} + \frac{\sin(\alpha) + \cos(\alpha)}{\cos(\alpha)} \frac{1}{\cos(\alpha)}\right]. $$
This simplifies to
$$\frac{T}{2} \times \frac{1}{\sin(\alpha) \cos(\alpha)} \times [\sin(\alpha) + \cos(\alpha) + 1]
\times \frac{\sin(\alpha) + \cos(\alpha) - 1}{\sin(\alpha) + \cos(\alpha) - 1}$$
$$ = \frac{T}{2} \times \frac{\sin^2(\alpha) + \cos^2(\alpha) + 2\sin(\alpha)\cos(\alpha) - 1}{\sin(\alpha)\cos(\alpha) \times [\sin(\alpha) + \cos(\alpha) - 1]}$$
$$ = \frac{T}{2} \times \frac {2}{\sin(\alpha) + \cos(\alpha) - 1}.$$