Geometry math question no Guessing and Please show work

The Pythagorean Theorem states that for right triangles:
a^2=b^2+c^2
a= the hypotenuse
b and c equals the other two sides.
In this case we are given the hypotenuse so we can rearrange the equation to look like this b^2=a^2-c^2 (I subtracted c^2 from both sides). I know a and c so I can solve for b.
We get rid of a square by implementing a square root on both sides and get:
b=sqrt(a^2-c^2) .... b=sqrt( (sqrt(34))^2 - 3^2)
b= sqrt(25) ..... b=5