Suppose y are no of units firm is producing and c is the cost of unit y.
Max Profit=Total revenue-Total Cost
Max Profit=(no of units)(price)-(no of units)(cost)
=30y-cy
Taking derivative with respect to y
Max profit=30
Total Variable Costs = Cost Per Unit x Total Number of Units
Cost per unit is c and total units are y so
Total Variable Costs=cy