Answer
$h=1$ and $k=4-3a$
Work Step by Step
We are given the function:
$$y=a|x-h|+k.\tag1$$
Substitute the values of $(x,y)$ of the two given points in Eq. $(1)$:
$$\begin{align*}
\begin{cases}
a|-2-h|+k&=4\\
a|4-h|+k&=4
\end{cases}
\end{align*}$$
Subtract the two equations side by side:
$$\begin{align*}
a|-2-h|+k-a|4-h|-k&=4-4\\
a(|h+2|-|4-h|)&=0.
\end{align*}$$
As $a\not=0$, we have:
$$|h+2|=|4-h|.\tag2$$
We solve Eq. $(2)$ for $h$ using the graphical method. We find the solution:
$$h=1.$$
From the system of equations we get:
$$a|4-1|+k=4$$
$$3a+k=4$$
Eq. $(1)$ can be written:
$$y=a|x-1|+4-3a.$$
So $h=1$ and $k=4-3a$.