Pls help with my math plssss

Consider the figure posted below.
The cars start from the common point A. The car heading east travels a certain distance, say [tex] x [/tex], and reaches point B. The car heading south travels 10 miles more, so [tex] x+10 [/tex], and reaches point C. The distance between the two cars, BC, is 50.
Since ABC is a right triangle, we can apply Pythagorean's theorem:
[tex] AB^2+AC^2=BC^2[/tex]
Plug the expressions/value for each side:
[tex] x^2+(x+10)^2=50^2 [/tex]
Expand/compute the squares:
[tex] x^2+x^2+20x+100 = 2500 \iff 2x^2+20x-2400 = 0 \iff x^2+10x-1200=0 [/tex]
The two solutions of this equation are [tex] x=40,\ x=-30 [/tex]
Since the cars can't travel a negative distance, the only acceptable solution is [tex] x=40 [/tex]