This is using the Pythagorean theorem. 2 sides of the triangle can get you the third side but only when it’s a right triangle.
The formula goes a^2+b^2=c^2, where a and b are legs of the triangle (the non hypotenuse sides), and c is the hypotenuse (the side opposite to the right angle).
In this problem, we have one leg and the hypotenuse.
So a^2+7^2=10^2.
Simplify
a^2+49=100
Subtract both sides by 49
a^2=100-49=51
Square root both sides
a=sqrt(51). 51 is prime so the radical cannot be simplified further.