In simple interest, we can use the formula:

Where P is the principal value, that is, the value of the loan, $9000; r is the annual rate and t is the period of loan in years.
We know Rita paid interest of $336, so

However, the period that she had is not in years, it is in months. However, in simple interest we can just convert "t" from year to months. If she got 7 months, this is equivalent of 7/12 years, because one year has 12 months.
Thus, t = 7/12
Now, we know "I", "P" and "t", we can substitute and solve for "r":

In percentage, we have 6.4% of annual interest.