\(\begin{cases} a+2b=-3-7a+b\\4a+2b=k-5a-mb \end{cases}\)
\(\begin{cases} 8a+b=-3 \\ 9a+(2+m)b=k \end{cases}\)
To have infinitely, these two equations must be exactly equal, or in other words, one equation is simplifiable to the other. (Another way to visualize it, is that these two lines, when plotted are the same graph).
So, by \(8a*\frac{9}{8}=9a\), the second equation is the first equation, both sides multiplied by \(\frac{9}{8}\).
For the b terms,\(\frac{9}{8}*1=2+m\)
For the constant term, \(-3*\frac{9}{8}=k\)
Solving, we get \(m=\frac{-7}{8}, k=\frac{-27}{8}\).