Answer :

To solve the length of a line, use the distance formula (which is also the pythagorean theorem). In this case, it's (5-x)^2 + (1+3)^2 = 20. 

Simplify that to (5-x)^2 + 16 = 20,
so (5-x)^2 = 4
So 5-x = 2 or -2,
so x = 3 or 7.