Answer:
f(x) = {5-x for x<5; x-5 for x≥5}
Step-by-step explanation:
You want to write f(x) = |x -5| as a piecewise function.
The absolute value function is defined as ...
[tex]|z|=\begin{cases}-z&\text{for }z < 0\\z&\text{for }z\ge0\end{cases}[/tex]
We can write your absolute value function this way by substituting (x-5) for z, and simplifying the resulting conditions.
[tex]\boxed{f(x)=\begin{cases}5-x&\text{for }x < 5\\x-5&\text{for }x\ge5\end{cases}}[/tex]