The first thing we must do for this case is to define variables.
 We have then:
 x: vanilla wafers
 y: chocolate wafers
 We now write the system of equations:
 4x + y = 45
 x + y = 27
 We solve the system of equations.
 Using the graphical method, we observe that the lines intersect is:
 (x, y) = (6, 21)
 Thus,
 x = 6
 y = 21
 Answer:
 6 vanilla wafers
 21 chocolate wafers