Solve for x.

z=4x-7y

x = (z+7y)/4

Solve for s.

-6=-15r+9s

s = (-6 + 15r) / 9

Solve for m.

n+8m=d

m = (d - n) / 8