Given:

To find:
The correct function.
Step-by-step explanation:
Let us consider the function given in option D.

Differentiating with respect to x we get,

Substituting x = 2 in the function f(x), we get

Therefore, the given conditions are satisfied.
So, the function is,

Final answer: Option D