A 6-foot spruce tree is planted 15 feet from a lighted streetlight whose lamp is 18 feet above the ground. How long is the shadow of that tree?

My idea for finding the length of the shadow is to use the Pythagorean theorem. Is this the right way to go?
Here you don't need the Pythagorean Theorem: You use the fact that for similar triangles, the lengths of respective sides form ratios:
Let $x$ be the unknown length of the shadow:
Then we have an equality of ratios given by $\dfrac{x}{6} = \dfrac{x+15}{18}\tag{1}$
First, we can multiply both sides of $(1)$ by 6, to clear or reduce denominators:
$$6\cdot \dfrac{x}{6} = 6\cdot\dfrac{x+15}{18} \quad\iff\quad x = \frac{x+15}{3}$$
Now we solve for $x$ by cross multiplying: $$3x = x + 15 $$ $$\iff \quad 2x = 15$$
$$\iff x = \frac{15}{2} = \;\;?$$