Question 882998
x-2 can be 0 or positive or negative.  A change occurs at x=2.


The case, {{{x-2<0}}} means {{{g(x)=-(x-2)+2=-x+2+2=-x+4}}};
Think carefully about the meaning of absolute value and maybe draw and label a numberline to see that.


The case {{{x-2=0}}} means x=2 and then {{{g(x)=2}}}.


The case, {{{x-2>0}}} means {{{g(x)=x-2+2=x+0=x}}}.


To understand this as a transformation, you would have started with {{{highlight_green(f(x)=abs(x))}}}; and then the x-2 means shifting two units to the right, and then the {{{highlight(y=g(x)=abs(x-2)+2)}}} means shifting two units upward.


{{{graph(300,300,-5,5,-5,5,abs(x-2)+2)}}}


Instead of this "simpler" function:
{{{graph(300,300,-5,5,-5,5,abs(x))}}}