Alright. I know this was already answered, so I'm just going to show you how to work it out so you can do it yourself in the future.
So the first step is to rewrite the equation.
Go from
y = 2 - x
to
y = -x + 2
The reason I can do this is because 2 - x has a negative x and a positive 2. We put the 2 in the back, and the x in the front.
Since we read graphs from left to right, this negative is going down, like if you were skiing down a hill. If you graph that, we have a nice, neat line with the x and y intercepts at 0. It has a 1 to 1 ratio, meaning it goes like this -
Let's work this out in 3 easy steps.
The parent function is y = x. Let's graph that.
(Look at Step 1)
Then, we reflect the line across the y-axis to make it y = -x.
(Look at Step 2)
Then, we have the +2. This means that we move the graph up 2 units.
(Look at Step 3)
If you follow these steps, you are guaranteed to get the graph right. If you have a graph like y = x - 1, you move the graph DOWN instead of up.
Let's do this with another graph, just for another example.
We have the equation y = -5 + x.
First, we make this equation easier to graph.
y = x - 5.
Now we graph the parent function, y = x.
(Look at Example Step 1)
Now we have the -5, so we have to move it down 5 units.
(Look at Example Step 2)
I hope this helps you!