A projectile follows a parabolic path whose height, in meters, is given by the function f(x) =-x^+2x+2, find the maximum horizontal distance that the projectile may cover

Assuming you mean

f(x) = -x^2 + 2x + 2

you want to find x where f(x) = 0. That is where it hits the ground. So, just solve the quadratic as usual.