How to get these variables?

Given:
Right triangle with one angle 45°
To find:
The value of q and r.
Solution:
Opposite to θ = 16
Adjacent to θ = r
Hypotenuse = q
Using trigonometric ratio formula:
[tex]$\tan \theta =\frac{\text{Opposite side to } \theta}{\text{Adjacent to } \theta}[/tex]
[tex]$\tan 45^\circ =\frac{16}{r}[/tex]
The value of tan 45° = 1
[tex]$1 =\frac{16}{r}[/tex]
Do cross multiplication, we get
r = 16
Using trigonometric ratio formula:
[tex]$\sin \theta =\frac{\text{Opposite side to } \theta}{\text{Hypotenuse}}[/tex]
[tex]$\sin 45^\circ =\frac{16}{q}[/tex]
The value of sin 45° = [tex]\frac{1}{\sqrt{2} }[/tex].
[tex]$\frac{1}{\sqrt{2} } =\frac{16}{q}[/tex]
Do cross multiplication, we get
[tex]q=16\sqrt{2}[/tex]
The value of r is 16 and the value of q is [tex]16 \sqrt{2}[/tex].