I'm having some problem with a few formulas:

I need to know, given the rate, payment, and years, what the amount of a loan would be.

And given the rate, years, and loan amount, what would the payment have to be.

Can anyone help me with this?