In figure A, the curved arrow shows the electrons are shiftedfrom 'O' atom to adjacent bond. This resonating structures isshown below:
In fig B , the curved arrow shows shifting of π− bond between C and N atoms to adjacent atom N. In this case as the nitrogen is most electronegative, thus it pulls the electron towards itself.