Here's the equation: 4x+1+x = 121. Where x is equal to the amount of vanilla cones. 5x + 1 = 121 5x = 120 x = 24 There were 24 vanilla and 97 chocolate.
The distance from a point to a line is distance(ax+by+c=0,(x0,y0)) = abs(ax0+by0+c)/sqrt(a^2+b^2) So first convert the formula for the line to standard form 5x+2y=4 5x+2y-4=0