You can use the following equation:
10h+3p+0.5r=100
This equation uses “h” “p” and “r” to represent the number of animals bought, each variable having a coefficient which is that animal's price. The right side is the total price.
You will now need a second equation so you can proceed to substitution/elimination:
h+p+r=100
This equation, using the same variables, represents the total number of animals to be bought.
We can eliminate the “h” variable by multiplying the bottom equation by -10, you now have the following:
10h+3p+0.5r=100
-10h-10p-10r=-1000
Add down and the result is:
-7p-9.5r=-900
You can set up a proportion
-9.5r=-900+7p
r=(-900+7p)/-9.5
And substitute in the original equation…
P.S. I challenge you to figure out the rest on your own because it is really just a tedious process of substitution and elimination from here and my phone is about to die. I'll check in later if you're still having problems.