I spent a lot of time to solve this problem but unfortunately I could not. Does anyone know how I can solve it?

"Consider a machine which is turned off when there is no work. It is turned on and restarts work when enough orders, say N, arrived to the machine. The setup times are negligible. The processing times are exponentially distributed with mean 1/mu and the average number

of orders arriving per unit time is lambda (<mu ).

Suppose that lambda = 20 orders per hour, (1/mu) = 2 minutes and that the setup cost is 54 dollar. In operation the machine costs 12 dollar per minute. The waiting cost is 1 dollar per minute per order.

Determine, for given threshold N, the average cost per unit time."

I know what the final solution is but I do not know how to get that. The final answer is:

(6/N) + 8 + (4 + (3/2).(N-1))

Thanks!