We'll use the variable "x" to represent the unknown number of students at the beginning of lunch.
Step 1: Initially, there are x students.
Step 2: Each student has 4 friends join them, tripling the number of students. So, after this step, there are 4x students in the lunchroom.
Step 3: When the bell rings, 1/4 of the students stay, while the rest leave. So, (1/4) * 4x = x students stay, and the others leave. After this step, there are x students remaining in the lunchroom.
Step 4: 8 more students join those who are still in the lunchroom. So, the total number of people in the lunchroom is x (those who stayed) + 8 (those who joined) = x + 8.
According to the information given, the total number of people in the lunchroom now is 22. So, we can create the equation:
x + 8 = 22
Now, you can solve this equation to find the initial number of students (x):
x = 22 - 8
x = 14
So, there were 14 students in the lunchroom at the beginning of lunch.