To find the amount you need to invest, we can use the formula for simple interest:

Here, the principal is the amount you need to invest, the rate is 3% (or 0.03 as a decimal), and the time is 4 years. We can rearrange the formula to solve for the principal:

Plugging in the given values, we get:

Simplifying further:

Calculating the division:

Therefore, you will need to invest $7500 at 3% to have earned $900 in interest in 4 years.