Let the equation of the tangent line at x = 2 be:
y - y1 = m*(x - x1) ......... (1)
We use the point-slope form of a straight line here.
Now, slope of the tangent to g(x) at x = 2 equals the value of the derivative of g(x) at x = 2.
Thus, m = g'(2) .................(2)
Given:
g(x) = x*f(x)
Using the product rule of derivatives (i.e. (uv)' = u'v + uv') we have:
g'(x) = x*f'(x) + 1*f(x)
=> g'(2) = 2*f'(2) + f(2)
=> g'(2) = 2*(-5) + 3
=> g'(2) = -7 .............................(3)
Plugging this value in eqn. (1), we have:
y - y1 = -7*(x - x1) ..............(4)
Next, we find the values of x1 and y1 at x = 2, i.e. the point (x1, y1).
We know that x1 = 2, and to find y1, we have:
y1 = g(2) = 2*f(2) = 2*3 = 6.
Putting these values in eqn. (4), we have:
y - 6 = -7*(x - 2)
=> y - 6 = 14 - 7x
=> 7x + y - 20 = 0
which is the equation of the tangent to g(x) at x = 2.