You can define a variable.

Let x be the sum invested at 9% interest.

(30000-x) will be the sum invested at 14% interest.

The interest in the first case becomes:

The interest in the second case becomes:

Total interest =

Now, equate to 3000 to find the value of x, the amount invested to 9% interest.

This gives you the greatest value invested at 9% interest to get 3000 interest per year.

If less is invested at 9%, more will be invested at 14% and you get a higher interest.

Ideally, if you want to make the most interest, put everything at 19%