The slope of the line through $(a,b)$ and $(a+3, b+k)$ is $\frac{b+k-b}{a+3-a}$, which is $\frac{k}{3}$.
The slope of the line $x=3y-7$ is $\frac{1}{3}$. This is because the equation can be rewritten as $3y=x+7$, and then in standard slope-intercept form as $y=\frac{1}{3}x+\frac{7}{3}$.
These slopes are equal $\frac{k}{3}$ and $\frac{1}{3}$ are equal.
Another way: Because $(a,b)$ is on the line, we have $a=3b-7$. Because $(a+3,b+k)$ is on the line, we have $a+3=3(b+k)-7$, that is, $a+3=3b+3k-7$.
Since $a=3b-7$, we conclude that $3=3k$.