Hi Jay!
Roger's way is much more concise.
Here is another way.
We're told the tangent line is 5x+7,
so f'(x) = 5x+7
f(x) = ∫f'(x)dx
f(x) = ∫(5x+7)dx
5x2
f(x) = ---- + 7x + C
2
(7,6) is a point on f(x), so can
use this to find C
5*72
6 = ------ + 7(7) + C
2
245
6 = ----- + 49 + C
2
12 = 245 + 98 + 2C
-331 = 2C
-331
C = ------
2
5x2 331
f(x) = ------ + 7x - ------
2 2
To find f(3), just plug in 3
for x above. You'll find it
should simplify to -122.