Let there are x total student surveyed, the 1/4x students prefer red, 1/8x prefer blue.
Determine the remaining students.
Determine the students that prefer green.
The students who preferred green is 15. So equation for x is,
So total students that were surveyed is equal to 40.