If PQ is the tangent, then m∠P = 90°.
Therefore we can use the Pythagorean theorem:
[tex]x^2=5^2+12^2\\\\x^2=25+144\\\\x^2=169\to x=\sqrt{169}\\\\\boxed{x=13}[/tex]