This shouldn't be too difficult.
The total amount owing will be
The interest as you have shown is
Here's the tricky bit, what is in years?
"Suppose that you take out an unsubsidized Stafford loan on Sept 1 before your junior year for $5500 and plan to begin paying it back on Dec 1 after graduation and grace period 27 months later. The interest rate is 6.8%. How much will you owe then, and how much of that will be in interest?"
The formula is I=Prt.