Putnam (Peter) is correct. Move the switch to east where the straight is between the curves. it's time to learn heights and grades. Coloring the track makes it hard to work with the layout. The tracks will behave separately. Color the line last.
The Lionel graduated trestle set is 11 pieces to 5 3/4" inches up and 11 down. The MTH set is 12 pieces to 6.5" Both are around a 4.7% grade.
So, the blue track from the top and to the bottom crosses the lower track twice. That area needs to be the same height at 5 3/4". That reduces the amount of track for the length of the grade. Moving the switch provides a few more feet.
Also, the O31 switch length is not 10', but it is 11 3/8". Add a 1 3/8" piece to the end past the turnout.