We have 30 people who attended the school dance and every person will eat 1 slice of cake. Based on the equation and the description of variables, we have x = 30 and a = 1. Substitute these values on the equation given on the problem and compute, we get

Hence, you should cut 6 slices per cake.