there are 2 possible triangles that can arranged one being the 8 the longest side, and another one being the 5 and 8 the sides of the triangle
use the pythagorean theorem to solve.
for the black triangle.
[tex]\begin{gathered} a^2+b^2=c^2 \\ (8^2+5^2)=c^2 \\ (89)=c^2 \\ \sqrt[]{89}=c \\ c=9.43 \end{gathered}[/tex]for the green triangle.
[tex]\begin{gathered} a^2+b^2=c^2 \\ 5^2+b^2=8^2 \\ b^2=(8^2-5^2) \\ b^2=39 \\ b=\sqrt[]{39} \\ b=6.25 \end{gathered}[/tex]