I agree, this is not an optimization problem. EDIT: Well, I guess you could consider the task to be optimizing the distance Agatha can travel first class.
I'll get you started, though:
Letdistance, in km, traveled first class.
Letdistance, in km, traveled second class.
Your two equations are:
Now, how can you relate these two equations to each other?
and
then i solved for y in the first equation and got
which I then plugged in to the second forumla and solved for x=1050, which, I think, is the number of kilometers the traveller would ride first class, is that right?