The profit can be calculated using the formula:

Where p is the profit, e is the variable for "total earnings", and c is the total cost of production. From the problem, we identify:

For the total earnings, if Betty sells g glasses for $1:

Finally, the profit is given by:
