Answer:
a)20833.3Btu/h
b)29166.7Btu/h
Step-by-step explanation:
A heat pump is a device that allows to emit heat to an enclosure (Qout), by means of the input of an electric power (W) and the heat input of an external source (Qin), the coefficient of performance COP, allows to know the relationship between the emitted heat (Qout) and the added electrical power (W), the equation for the COP is

For the second part, we must use the first law of thermodynamics and understand that the heat output (Qout) is the sum of the electrical power (W) and the external heat (Qin), then:
Qin = Qout-W
Qin=50000Btu/h-20833.3Btu/h
Qin=29166.7Btu/h