Answer
$f(x)=\left\{
\begin{array}{cc}
-x+1 & \quad \text{for } x \lt 0 \\
x+1 & \quad \text{for }x \geq 0
\end{array}
\right.$
Work Step by Step
We know that $|x|=\left\{
\begin{array}{cc}
-x & \quad x \lt 0 \\
x & \quad x \geq 0
\end{array}
\right.$
Given $y=f(x)=|x|+1$
So, writing $f(x)$ as a piecewise function, we have
$f(x)=\left\{
\begin{array}{cc}
-x+1 & \quad \text{for } x \lt 0 \\
x+1 & \quad \text{for }x \geq 0
\end{array}
\right.$