Answer:
the 8% loan has a principal of $37500
the 12% loan has a principal of $12500
Step-by-step explanation:
Let's start by writing the general equation for the interest hwre I is the interest, P is the principal (in our case would be loan amounts), "r" is the interest rate in decimal form (in our case one would be 0.12, and the other one 0.08), and t is the time in years (in our case 1 year).

Then we write the interest equation coming from each loan at the end of this year (we call I1 the interest coming from the 12% loan and I2 the interest coming from the 8% one). Since we don't know the loan amounts (in fact those are what we need to find) we will name one "x" and the other "y":

Next, we add these last two equations term by term, and replace the addition of both interests by $4500 as given in the information:

This is our first equation in the variables x and y which are our unknowns.
Now we generate the second equation on x and y by writing in agebraic terms the other piece of information we have: "the total of the two loans is $50000. That is the addition of the principals x and y should equal $50000:

We solve for y in this last equation and replace its form in terms of x in the equation of the interest, and solve for the unknown x:

Therefore the amount of the loan at 12% is $12500
Now to find the amount of the second loan "y" we use the equation for the totals of the loans:

Therefore, the loan at 8% is $37500