the given 6 = w/p is equivalent to 6p = w, where w is the total area of the walls and p is the area covered by a single can of paint.
knowing that 6 cans of paint will be needed, 6p = w becomes 6(6) = w = 36. this tells us that the total area to be painted is 36 square units.