The ratio of Mon's pencils to Josh's pencil id 5:7. Josh has 18 pencils more than Mon. If Josh gives 9 pencils to Mon, what will be the new ratio of Mon's pencils to Josh's pencils?

m/j = 5/7

j = m+18
solve for m and j. Then you want
(m+9)/(j-9)