9a please i just need help understanding how to do it

Given:
Points on the given function are (0,2), (1,0), and (2,2).
Required:
We need to find the piecewise function.
Explanation:
Consider the piecewise function.
[tex]y=|x|[/tex]The graph of the function is
The point lie on the function is (-2.2), (0,0) and (2,2).
The point (0,0) from the graph y=|x| is moved right one unit.
Reduce the values of x by 2 units since graph y=|x| is moved right one unit.
The difference between (-2,2) and (2,2) is (2-(-2))=4 units in graph y=|x|.
[tex]y=|x-2|[/tex]The difference between (0,2) and (2,2) is (2-0)=2 units in the given graph.
The given graph is shortened by 2 units.
Multiply the x coordinates by 2.
[tex]y=|2x-2|[/tex]Final answer:
[tex]y=|2x-2|[/tex]