
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Eloise must travel from $P$ to $Q$, then from $Q$ to $R$, and finally from $R$ to $P$. Each leg of the trip is completed either entirely by train or entirely by ferry. The cities form a right-angled triangle with $R$ at the right angle. The distance from $P$ to $R$ is 4000 km, and the distance from $P$ to $Q$ is 5000 km. Traveling by train costs Eloise $\$0.20$ per kilometer. Traveling by ferry involves a $\$150$ booking fee plus $\$0.15$ per kilometer. Determine the distance Eloise travels for her entire trip.

Present the answer in LaTex format: \boxed{Your answer}
user