Given the parant function f(x) = x
We need to find the transformation required to obtain the finction g(x) = -x + 2
So, the transformations will be:
1) reflect f(x) over the y-axis to obtain ( -x )
2) shift the result of reflection from (1) two units right or 2 units up
The graph of f(x) and g(x) is as shown in the following picture: