Answer
a.) $p=-20W$ delivered
b.) $p= 36W$ absorbed
(Negative sign indicates that it was delivered)
Work Step by Step
a.)
use passive sign convention, flip sign on voltage to get current flowing into the + terminal
$ p = -10V * 2A = -20W $ (delivered)
b.)
use passive sign convention, change polarity of voltage source
$ p = 9V * 4A = 36 W $ ( absorbed)