Answer
$$31.3 \ cm .$$
Work Step by Step
Since we have a right triangle with legs a, b and the hypotenuse c, then by the Pythagorean theorem, we have $$c^2=a^2+b^2.$$
Since $a= 39.5 in$ and $b=45 in$, then $a$ is given by
$$distance= c=\sqrt{a^2+b^2}=\sqrt{28.2^2+13.6^2}=31.3 \ cm .$$