We are asked to determine the maximum value of "x" for a profit function given the functions of revenue and cost. To do that let's remember that profit is defined as:

Let P(x) be the function of profit, then the difference between the functions of revenue and cost is the function of profit, therefore:

Replacing the functions we get:

Now we apply the distributive property in the parenthesis:

Adding like terms:

Now, to determine the maximum profit we will determine the derivative of the profit function with respect to "x":

Now we distribute the derivative on the left side:

Now we determine the derivative using each corresponding rule:

Now we set the result to zero:

Now we solve for "x" first by subtracting 48 from both sides:

Now we divide both sides by -6:

Now, since the original function is a parabola that opens downwards, this point must be a maximum. To verify that we can determine the second derivative and we get:

Since the second derivative is smaller than zero, the point is a maximum as hypothesized. Therefore, the maximum value of "x" is 8.