Set a right-angled triangle with one of the angle = x.
sin x = 5/8 means opposite of x = 5 and hypotenuse = 8.
By means of Pythagoras theorem we get the adjacent of x = \(\sqrt{8^2 - 5^2}\) = \(\sqrt{39}\)
Therefore cos x = adjacent/hypotenuse = \(\dfrac{\sqrt{39}}{8}\)
tan x = sin x / cos x = \(\dfrac{5}{\sqrt{39}}\) = \(\dfrac{5\sqrt{39}}{39}\)
By formula we get:
\(\sin(2x)=2\sin x \cos x = 2\left(\dfrac{5}{8}\right)\left(\dfrac{\sqrt{39}}{8}\right)=\dfrac{5}{32}\sqrt{39}\)
\(\cos(2x)=1-2\sin^2 x = 1- 2\cdot\left(\dfrac{5}{8}\right)^2=\dfrac{7}{32}\)
\(\tan(2x)=\dfrac{\sin (2x)}{\cos (2x)}=\dfrac{\frac{5}{32}\sqrt{39}}{\frac{7}{32}}=\dfrac{5}{7}\sqrt{39}\)