Question 418478
Let x the one speed and x+5 the speed of the other train...
Multiply each speed with the time (2 hours)related to it to obtain the miles they have done.
Then we use the Pythagorean theorem.
{{{(2(x+5))^2+(2x)^2=50^2}}}
{{{4(x^2+10x+25)+4x^2=50^2}}}
{{{4x^2+40x+100+4x^2=2500}}}
{{{8x^2+40x+100-2500=0}}}
{{{8x^2+40x-2400=0}}}
divide by 8
{{{x^2+5x-300=0}}}
Use the formula {{{x=(-b+-sqrt(b^2-4ac)/2a)}}} for a=1,b=5,c=-300
to obtain
{{{x=(-5+sqrt(5^2+4*1*300)/2)}}} OR {{{x=(-5-sqrt(5^2+4*1*300)/2)}}}
We get
{{{x=(-5+35)/2}}}
omit the negative solution as non geometrical
x=30/2
x=15 is the first speed.
and 15+5=20 the other.