Well, first of all, we can simplify the bottom equation:
6a + 2b = k + 3a + mb
into
3a + 2b = k + mb
Because the top equation is also 3a+2b, and the bottom is also 3a+2b, and there are infinitely many solutions, that means:
k+mb = 2
And because b can be anything, that means m has to be 0 to work. that means k = 2
k = 2
m = 0