Lời giải:
\(\Leftrightarrow \left[ \begin{array}{l} \begin{cases} -2 - m > 0 \\ \frac{m}{2} \notin [0, 1] \\ f(1) = \frac{m}{2 - m} = 2 \end{cases} \\ \begin{cases} -2 - m < 0 \\ \frac{m}{2} \notin [0, 1] \\ f(0) = \frac{1 + m}{-m} = 2 \end{cases} \end{array} \right.\)
\(\Leftrightarrow \left[ \begin{array}{l} \begin{cases} m < -2 \\ m \notin [0, 2] \\ m = \frac{4}{3} \end{cases} \\ \begin{cases} m > -2 \\ m \notin [0, 2] \\ m = -\frac{1}{3} \end{cases} \end{array} \right.\)\(\Leftrightarrow m = -\frac{1}{3}\)