What is the length of leg s of the triangle below?

Hey there!
There are a few ways to do this, but I'll give you the one I can explain best.
This is a right triangle. We know this because one of the angles is 90º.
The lengths of the sides of the right triangle can be represented by the following equation:
a² + b² = c²
We already have the values for a and c, c being the hypotenuse.
3² + b² = (√18)²
Let's square a and c.
9 + b² = 18
Subtract 9 from each side of the equation.
b² = 9
To find the final value for b, find the square root of each side of the equation.
b = 3
Your answer is 3, or option D.
Hope this helps!