a,
Thay x, y vào f(x), ta có:
$m|2-1|-2=-1$
$\Leftrightarrow m=1$
Vậy y= f(x)= |2-x|-2
b,
Với $2-x \ge 0 \Leftrightarrow x \le 2$, y= f(x)= 2-x-2= -x
Với $2-x <0 \Leftrightarrow x>2, y= x-2-2= x-4$
Vậy trên $(-\infty; 2]$, f(x)= -x; trên $(2;+\infty)$, f(x)= x-4