How do you calculate the total power developed in a circuit?
For each element, compare the sign of the voltage to the sign of the current. Or, multiply the current by the voltage and look at the sign of the resulting power value.


If the current is flowing from the more positive side to the more negative side, then the element must be removing energy from the circuit (dissipating/transducing it, e.g. a resistor, motor, LED).
If the current is flowing from the more negative side to the more positive side, then the element must be adding energy to the circuit (e.g. a battery or other power supply).


Your diagram is a bit tricky, though: it looks like it uses negative signs to mean "the voltage or current is in the opposite direction as the arrow or plus sign would otherwise indicate". So you've got to read the diagram and change the signs on some of the numbers to get values you can actually compute with.

Ways to check your work:


You should find that the sum of power from all sources and the sum of power from all sinks is equal. If not, then the circuit is impossible as it violates conservation of energy (or you made a calculation error).
Apply Kirchhoff's circuit laws. As a special case, note that the currents through elements a, b, and c must be consistent with each other (even if some of them are measured in the opposite direction, which is silly), and the same for e and f.