Let \( x \) be the amount Mr. P invested in the company that earned a 5% profit. Therefore, the amount he invested in the company that earned a 10% profit would be \( 250,000 - x \).
The profit from the first investment (5% profit) can be expressed as: \[ \text{Profit from 5% investment} = 0.05x \]
The profit from the second investment (10% profit) can be expressed as: \[ \text{Profit from 10% investment} = 0.10(250,000 - x) \]
According to the problem, the profit from the 10% investment is three times the profit from the 5% investment: \[ 0.10(250,000 - x) = 3 \times 0.05x \]
Simplifying the equation: \[ 0.10(250,000 - x) = 0.15x \] \[ 25,000 - 0.10x = 0.15x \]
Now, combine like terms: \[ 25,000 = 0.10x + 0.15x \] \[ 25,000 = 0.25x \]
Now solve for \( x \): \[ x = \frac{25,000}{0.25} = 100,000 \]
Thus, Mr. P invested \( \boxed{100,000} \) in the company that made a 5% profit.
To verify:
- The amount invested in the 10% profit company is \( 250,000 - 100,000 = 150,000 \).
- Profit from the 5% investment: \( 0.05 \times 100,000 = 5,000 \).
- Profit from the 10% investment: \( 0.10 \times 150,000 = 15,000 \).
- Check the relationship: \( 15,000 \) is indeed \( 3 \times 5,000 \).
The calculations are consistent, confirming that Mr. P invested \( \boxed{100,000} \) in the company that made a 5% profit.