Answer
The student incorrectly substituted the given length of the hypotenuse (13) into the equation where the length of a leg should have been used.
x=5
Work Step by Step
In the equation $a^2+b^2=c^2$, a and b are the lengths of the two legs and c is the length of the hypotenuse.
$a^2+b^2=c^2\longrightarrow$ substitute the given values
$12^2+x^2=13^3\longrightarrow$ compute the squares
$144+x^2=169\longrightarrow$ subtract 144 from each side
$144+x^2-144=169-144\longrightarrow$ subtract
$x^2=25\longrightarrow$ find the square root of each side
$\sqrt {x^2}=\sqrt {25}\longrightarrow$ simplify
$x=5$