Determining the values of $b$ in $Ax=b$ to have a consistent system. 
$$\begin{bmatrix} 1 & -4 & 7\\ 0 & 3 & -5\\ -2 & 5 & -9
 \end{bmatrix}\begin{bmatrix}g \\ h \\ k\end{bmatrix}$$
What are the real values of $g,h,k$ for the system to be consistent?

Let's just get the reduced row echelon form:

$$\begin{bmatrix} 1 & -4 & 7\\ 0 & 3 & -5\\ -2 & 5 & -9
 \end{bmatrix}\begin{bmatrix}g \\ h \\ k\end{bmatrix}$$
$$2r_1+r_3$$
$$\begin{bmatrix} 1 & -4 & 7\\ 0 & 3 & -5\\ 0 & -3 & 5
 \end{bmatrix}\begin{bmatrix}g \\ h \\ k + 2g\end{bmatrix}$$
$$r_2+r_3$$
$$\begin{bmatrix} 1 & -4 & 7\\ 0 & 3 & -5\\ 0 & 0 & 0
 \end{bmatrix}\begin{bmatrix}g \\ h \\ k + 2g + h\end{bmatrix}$$
$$\frac{1}{3}r_2 , 4r_2+r_1$$
$$\begin{bmatrix} 1 & 0 & 1/3\\ 0 & 1 & -5/3\\ 0 & 0 & 0
 \end{bmatrix}\begin{bmatrix}g + 4h/3 \\ h/3 \\ k + 2g + h\end{bmatrix}$$

Neat, we got a clue now:
If the value of $k + 2g + h$ is different than $0$, the system becomes inconsistent. So ideally, we should be solving
$$k + 2g + h = 0$$
But I'm not sure what to do now.
According to the exercise, the answer is
$$\{(g+4h/3 + 1/3, h/3 + 5t/3, t) \forall t \in \mathbb{R}\}$$
What was the reasoning behind this solution?
 A: The answer given is the solution of your system, not the value of $(g,h,k)$, so if your problem is stated correctly, this is not the correct answer (it answers another question).
When you have:
$$\begin{bmatrix} 1 & 0 & 1/3\\ 0 & 1 & -5/3\\ 0 & 0 & 0
 \end{bmatrix}\begin{bmatrix}g + 4h/3 \\ h/3 \\ k + 2g + h\end{bmatrix}$$
It's easy to conclude: you must have $k+2g+h=0$ and it's the only condition as you can do usual backsubstitution then (and your system has infinitely many solutions, since any value of $z$ will do, assuming your unknowns are named $x,y,z$).
That is, for any given $k$, and any given $h$, you must have $g=-\frac{h+k}{2}$, and that's all, so the solution for $g,h,k$ is simply:
$$\{(-\frac{h+k}{2},h,k);  h,k\in \Bbb R\}$$
A: For the problem you asked, the problem becomes simpler if you look at it differently.
Rather than asking

For which vectors $b$ does  $Ax=b$ have a solution for $x$?

you should instead ask

What vectors can I get by computing $Ax$ for all $x$?

That is, you're looking for the column space of $A$.
