To derive the function, we will use the power rule.
Power rule is expressed with the following formula:
[tex]\frac{d}{dx} x^n = n \cdot x^{n-1}[/tex]
Use this rule to derive both terms in the function:
[tex]\frac{d}{dx} [6x - x^2] = \frac{d}{dx} 6x - \frac{d}{dx} x^2[/tex]
[tex]\frac{d}{dx} 6x = 6[/tex]
[tex]\frac{d}{dx} x^2 = 2x[/tex]
[tex]\frac{d}{dx} [6x - x^2] = 6 - 2x[/tex]
We can now plug in the x-value for this derivative to find the slope of the tangent line at said x-value:
[tex]f'(4) = 6 - 2(4) = 6 - 8 = \boxed{-2} [/tex]
The slope of the tangent line at x = 4 will be -2.