The cost function is a function that describes the total cost of producing x number of books. The fixed cost of 25000 is a constant cost that does not depend on the number of books produced, so it is not included in the cost function. The cost function is therefore:
Cost function: C(x) = 30x
The profit function is a function that describes the profit made from selling x number of books. The profit is equal to the revenue from selling the books minus the cost of producing the books. The revenue from selling x number of books at a price of 50 each is 50x, so the profit function is:
Profit function: P(x) = 50x - 30x = 20x
This profit function tells you that for every book you sell, you will make a profit of 20.