given the function f(x) = { x^2+2 if X<=2, 3 if x=2 and 4-x if x>= 2

-> graph f(x)

I notice a contradiction in your definition of f(x)

you have
f(x) = 3 when x = 2
and then
f(x) = 4-x when x ≥ 2
So which is it for x = 2 ?

Other than that, I really feel you should be able to graph that function without any help if you are studying Calculus.
This is very elementary algebra.
Let me know what part you don't understand.