For option a,there is a shared lock on B, so how it can write B, therefore wrong option.
For option b, exclusive lock on A is unlocked before commit , therefore wrong option.
For option c, all is correct as exclusive lock on B is removed after commit .
For option d, exclusive lock on B is removed before commit, therfore wrong option.