To find the total number of students \( t \) in Ms. Garcia's class, we know that two-thirds of the class own a pet, and this number equals 8 students. We can set up the equation based on the information given:
\[ \frac{2}{3}t = 8 \]
To solve for \( t \), we can multiply both sides of the equation by the reciprocal of \(\frac{2}{3}\), which is \(\frac{3}{2}\):
\[ t = 8 \cdot \frac{3}{2} \]
Calculating that gives:
\[ t = 8 \cdot 1.5 = 12 \]
Thus, the equation that models the total number of students is:
\[ t = 12 \]