John has $1800 hidden under his mattress and $250 in the cookie jar.

He decides to take his money to a bank, where he divides it between an investment earning 8% and an investment earning 9.5%. If he earns $181.25 in simple interest, how much is in each account?

To solve this problem, we need to set up a system of equations. Let's denote the amount of money John invests in the account earning 8% as "x," and the amount he invests in the account earning 9.5% as "y."

We are given that John has $1800 hidden under his mattress, so we can create the equation:

x + y = 1800 ----(1)

We are also given that John has $250 in the cookie jar, so we have:

0.08x + 0.095y = 181.25 ----(2)

To solve this system of equations, we can use one of several methods, such as substitution, elimination, or matrices. Let's solve it using the substitution method.

First, solve equation (1) for x in terms of y:

x = 1800 - y

Substitute this expression for x in equation (2):

0.08(1800 - y) + 0.095y = 181.25

Now, distribute 0.08:

144 - 0.08y + 0.095y = 181.25

Combine like terms:

0.015y + 144 = 181.25

Next, isolate y by subtracting 144 from both sides:

0.015y = 37.25

Now, divide both sides by 0.015 to solve for y:

y = 37.25 / 0.015

y ≈ 2,483.33

So, John invested approximately $2,483.33 in the account earning 9.5%.

Now, substitute this value of y back into equation (1) to solve for x:

x + 2,483.33 = 1800

x ≈ 1800 - 2,483.33

x ≈ -683.33

Since the result is negative, it doesn't make sense in this context. Therefore, the solution for x is not valid.

In conclusion, John invested approximately $2,483.33 in the account earning 9.5%. There is no valid solution for the amount invested in the account earning 8%.