We can solve this using a system of similar right triangles.
We have one triangle where the short leg is 12 and the long leg is x.
We have another triangle where the short leg is x and the long leg is 21.
We can set up a ratio to find the length of x.
12/x=x/21
Now we can just cross-multiply to find an answer.
x^2=12x21
x^2=252
x=15.87