Trigonometric problem (problem from a Swedish 12th grade ‘Student Exam’ from 1932) The following problem is taken from a Swedish 12th grade ‘Student Exam’ from 1932.

The sum of two angles are $135^\circ$ and the sum of their tangents are $5$. Calculate the angles.

Is there a shorter/simpler solution than the one presented below that I made some months ago? It seems rather ‘lengthy’.

Solution
Let the angles be $\alpha$ and $\beta$.
We have
$$
\left\{
\begin{aligned}
\alpha+\beta&=135°,\\
\tan(\alpha)+\tan(\beta)&=5.
\end{aligned}
\right.
$$
Since
$$
\tan(x)+\tan(y)
=\frac{\sin(x)}{\cos(x)}+\frac{\sin(y)}{\cos(y)}
=\frac{\sin(x)\cos(y)+\cos(x)\sin(y)}{\cos(x)\cos(y)}
=\frac{\sin(x+y)}{\cos(x)\cos(y)}
$$
we have
$$
5
=\tan(\alpha)+\tan(\beta)
=\frac{\sin(\alpha+\beta)}{\cos(\alpha)\cos(\beta)}
=\frac{\sin(135°)}{\cos(\alpha)\cos(\beta)}
=\frac{\frac{1}{\sqrt{2}}}{\cos(\alpha)\cos(\beta)}
$$
which gives
$$
\cos(\alpha)\cos(\beta)=\tfrac{1}{5\sqrt{2}}.
$$
Further
$$
-\tfrac{1}{\sqrt{2}}
=\cos(135°)
=\cos(\alpha+\beta)
=\cos(\alpha)\cos(\beta)-\sin(\alpha)\sin(\beta)
=\tfrac{1}{5\sqrt{2}}-\sin(\alpha)\sin(\beta)
$$
which gives
$$
\sin(\alpha)\sin(\beta)
=\tfrac{1}{5\sqrt{2}}+\tfrac{1}{\sqrt{2}}
=\tfrac{6}{5\sqrt{2}}.
$$
Since $\alpha+\beta=135°$ we have
\begin{align*}
\sin(\alpha)\sin(\beta)
&
=\sin(\alpha)\sin(135°-\alpha)
\\&=\sin(\alpha)\bigl(\sin(135°)\cos(\alpha)-\cos(135°)\sin(\alpha)\bigr)
\\&=\sin(\alpha)\bigl(\tfrac{1}{\sqrt{2}}\cos(\alpha)+\tfrac{1}{\sqrt{2}}\sin(\alpha)\bigr)
\\&=\tfrac{1}{\sqrt{2}}\sin(\alpha)\bigl(\cos(\alpha)+\sin(\alpha)\bigr)
\\&=\tfrac{1}{\sqrt{2}}\bigl(\sin(\alpha)\cos(\alpha)+\sin^2(\alpha)\bigr)
\\&=\tfrac{1}{\sqrt{2}}\Bigl(\tfrac{1}{2}\sin(2\alpha)+\tfrac{1}{2}\bigl(1-\cos(2\alpha)\bigr)\Bigr)
\\&=\tfrac{1}{2\sqrt{2}}\bigl(\sin(2\alpha)+1-\cos(2\alpha)\bigr)
\end{align*}
why
\begin{gather*}
\tfrac{6}{5\sqrt{2}}=\tfrac{1}{2\sqrt{2}}\bigl(\sin(2\alpha)+1-\cos(2\alpha)\bigr)
\\\quad\Leftrightarrow\quad
\tfrac{12}{5}=\sin(2\alpha)+1-\cos(2\alpha)
\\\quad\Leftrightarrow\quad
\tfrac{7}{5}=\sin(2\alpha)-\cos(2\alpha)
\\\quad\Leftrightarrow\quad
\tfrac{7}{5}=\sqrt{2}\sin(2\alpha-\tfrac{\pi}{4})
\\\quad\Leftrightarrow\quad
\tfrac{7}{5\sqrt{2}}=\sin(2\alpha-\tfrac{\pi}{4})
\end{gather*}
which gives
\begin{gather*}
2\alpha-\tfrac{\pi}{4}=
\begin{cases}
\arcsin(\tfrac{7}{5\sqrt{2}})+n_12\pi\\
\pi-\arcsin(\tfrac{7}{5\sqrt{2}})+n_22\pi
\end{cases}
\\\quad\Leftrightarrow\quad
\alpha=
\begin{cases}
\tfrac{1}{2}\bigl(\arcsin(\tfrac{7}{5\sqrt{2}})+\tfrac{\pi}{4}+n_12\pi\bigr)\\
\tfrac{1}{2}\bigl(\pi-\arcsin(\tfrac{7}{5\sqrt{2}})+\tfrac{\pi}{4}+n_22\pi\bigr)
\end{cases}
\\\quad\Leftrightarrow\quad
\alpha=
\begin{cases}
\tfrac{1}{2}\arcsin(\tfrac{7}{5\sqrt{2}})+\tfrac{\pi}{8}+n_1\pi\\
-\tfrac{1}{2}\arcsin(\tfrac{7}{5\sqrt{2}})+\tfrac{5\pi}{8}+n_2\pi
\end{cases}
\end{gather*}
where $\beta=135°-\alpha=\frac{3\pi}{4}-\alpha$ and $n_1,n_2\in\mathbb{Z}$, and vice versa since the problem is ‘symmetrical’.

The original exam

 A: Recall that $\tan(\alpha+\beta)=\frac{\tan\alpha+\tan\beta}{1-\tan\alpha\tan\beta}$. Now, given $\alpha+\beta=135^{\circ}$ and $\tan(\alpha+\beta)=\tan 135^\circ=-1$, you get $\frac{5}{1-\tan\alpha\tan\beta}=-1$, i.e. $\tan\alpha\tan\beta=6$. Now, knowing the sum ($5$) and the product ($6$) of $\tan\alpha$ and $\tan\beta$, using Vieta formulas we conclude that $\tan\alpha$ and $\tan\beta$ are the solutions of the quadratic equation $x^2-5x+6=0$, i.e. $\tan\alpha$ and $\tan\beta$ are $2$ and $3$ in some order. This is now very easy to finish off: $\alpha=\arctan 2+n\cdot 180^{\circ}$ and $\beta=135^{\circ}-\alpha=\arctan 3-n\cdot 180^{\circ}$, or vice versa.
A: Take $\tan$ of both sides of first equation, $$\tan (\alpha + \beta) = \dfrac{\tan \alpha + \tan \beta}{1-\tan \alpha \tan \beta}$$
$$\Rightarrow \tan 135 = -1 = \dfrac{5}{1-\tan \alpha \tan \beta}  $$
$$\Rightarrow \tan \alpha \tan \beta=6$$
Setting $\tan \alpha = x$,  $\tan \beta = y$ we get two equations : $$x+y=5 \quad xy=6$$
I believe you can easily solve from here.
