I solved this by writing a function. You could also make a table and do the calculation for each year, but here's what I did:
Call 2012 year 1, since this is the earliest time we have. Using t for time in years and P for number of pets with the general slope-intercept form of a linear equation, we have P(t)=mt + b. m is the slope, and b is the 4y-intercept. We have two points, at (1, 284), for the first year with 284 pets. The fourth year, in 2016, would be represented by the point (4, 320). Finally, 2021 is nine years after 2012, so it's (9, ?). And we need to find that population, or y value.
Slope is the change in y divided by the change in x: m=(320-284)/ (2016-2012) = 36/4=9. So m=9 pets/year.
Now we have P(t)=9t + b.
We can plug in a P value and t value we already have, like (1,284), to find b. Plugging that in our general equation, we have 284 = 9(1) +b.
284 = 9+b.
Subtracting 9, 275=b.
Voila! Our linear model for this situation is P(t)=9t + 275, where t=1 in the year 2012. Plugging 9 in for t to represent the year 2021, we get P(9)=9(9) + 275.
81+275= 356 pets in 2021.
I hope this helps, and have fun mathing!
LizZ.