Total daily cost = C = 45x +27 where x is the number of units sold or produced.
Price/unit = P = 60 - 0.5x
Revenue/day = R = Px = x(60 - 0.5x) = 60x - 0.5x2
Profit = R - C = 60x - 0.5x2 - (45x + 27) -> 60x - 0.5x2 - 45x - 27 -> -0.5x2 + 15x - 27.
The "a" is neg. so the parabola opens downwards and there is a maximum at x = -b/2a
-b/2a = -15/-1 = 15 units
When x = 15, Profit = -0.5(152) + 15(15) - 27 -> -112.5 + 225 - 27 = $85.5 (try the equation on the Desmos Graphing Calculator site to confirm).
Could also take the 1st derivative of the profit expression and set it = to 0 to get x value at maximum profit.