You could work out the formulas for them or just look them up on google to see how people do it for examples
X = 2
The absolute value lines basically just serve as parentheses in this equation.
(2-1)/(2-1) = 1
(1)/(1) = 1
Each student would get 4/5 bag of popcorn