The slope has to stay the same, still a, but we need the line to go through (-8, -18).
We can just write
y = ax + some constant
y - ax = some constant
and it since (x,y)=(-8,-18) is on the line that constant must be
y - ax = -18 - a(-8) = 8a - 18
So in slope intercept form our line is
y = ax + (8a - 18)