here, what do we do if it says y=-x or y=x

You plot the points on the graph first with a pencil. Draw the given line, in this case, it's y=-x.
From a point, you do rise and run to the line and reverse it on the other side of the line to get the points.
Refer the attached diagram, for easy method.
Hope it helps :)