Answer
see graph
Work Step by Step
Using a table of values, the red graph is the graph of the first equation and the blue graph is the graph of the second equation in the given piecewise function, $
g(x)=
\begin{cases}
3x-1
\text{ if }
x\le2
\\
-x
\text{ if }
x\gt2
.\end{cases}$