Answer
a) $5000\;\rm J$
b) $1.67$
Work Step by Step
a) We know that the power is given by $P=W/t$ where $W$ is the work or the energy and $t$ is the time.
And we know, from the first thermodynamics law, that
$$W_{out}=Q_H-Q_C$$
Dividing both sides by $t$;
$$\dfrac{W_{out}}{t}=\dfrac{Q_H}{t}-\dfrac{Q_C}{t}$$
Thus,
$$P_{out}=P_{in}-P_{loss}$$
Plugging the known and converting minutes to seconds,
$$P_{out}=\dfrac{(8\times 10^5)}{60}-\dfrac{(5\times 10^5)}{60} $$
$$P_{out}=\color{red}{\bf 5000}\;\rm W$$
---
b) The coefficient of performance of the air conditioner is the same as that of the fridge which is given by
$$K=\dfrac{Q_C}{W_{in}}=\dfrac{P_{loss}\color{red}{\bf\not} t}{P_{out}\color{red}{\bf\not} t}$$
$$K=\dfrac{\left(\dfrac{5\times 10^5}{60}\right)}{5\times 10^3}$$
$$K=\color{red}{\bf 1.67}$$