Answer
$g(x)=\left\{
\begin{array}{cc}
-7x-12,& \quad \text{if }x\lt -1\\
7x+2, & \quad \text{if }x \geq -1
\end{array}
\right.$
Work Step by Step
The absolute value function $g(x)=a|x-h|+k$ can be written as a piecewise function.
$g(x)=\left\{
\begin{array}{cc}
a[-(x-h)]+k,& \quad \text{if }x-h\lt 0 \\
a(x-h)+k, & \quad \text{if }x-h \geq 0
\end{array}
\right.$
Given $y=g(x)=7|x+1|-5$
$\implies a=7, h=-1$ and $k=-5$
Then, $g(x)$ as a piecewise function is
$g(x)=\left\{
\begin{array}{cc}
7[-(x+1)]-5,& \quad \text{if }x+1\lt 0 \\
7(x+1)-5, & \quad \text{if }x+1 \geq 0
\end{array}
\right.$
Simplifying, we get
$g(x)=\left\{
\begin{array}{cc}
-7x-12,& \quad \text{if }x\lt -1\\
7x+2, & \quad \text{if }x \geq -1
\end{array}
\right.$