This graph illustrates the answer worked out below
https://www.wolframalpha.com/input/?i=y+%3D+x%5E2+-+6,+y+%3D+2x+-+7,+x+%3D+5,+(y+from+-7+to+6)
y = x^2 + c and when x = 1, y = c + 1
Slope of tangent line is given by
dy/dx = 2x which is 2 when x = 1
Line with slope 2 goes through (5, 3) and (1, c + 1)
(2 – c)/(5 – 1) = 2, so, c = -6