Let x represent the amount invested that brings 5% of interest.
Let y represent the amount invested that brings 8% of interest.
Then you can say that
Next, the total annual interest is $250
5% of x can be expressed as: 0.05x
8% of y can be expressed as: 0.08y
Together both invesments bring:
With this we have established a system of two equations with two unknowns.
Next clear one of the expressions in terms of one of the unknowns:
Replace this in the second equation and solve:
The amount invested at the 8% rate is $2500