pythagoreas theorem
if you have a right triangle with legs length a and b and the hyptonuse is length c then
a²+b²=c²
so
the legs are 12 and x
the hyponuse is 24
12²+x²=24²
144+x²=576
minus 144 both sides
x²=432
sqrt both sides
x=√432
x=12√3
round
x≈20.7846
round
x=20.78 units