You shouldn't use x to stand for both pizzas AND hamburgers.

Let x be number if hamburgers and y be number of pizzas.

There are 30 people in total, and they only have one, so the total number of hamburgers PLUS pizzas is 30.

And, as stated, there are 5 times as many hamburgers as pizzas, so: