One way is with the contrib node node-red-contrib-queue-gate. Sensor B will trigger the release from the queue of the last message from Sensor A.
[{"id":"b002bb26fe613d70","type":"inject","z":"a8b6a475c8d16c7d","name":"SENSOR A","props":[{"p":"payload"}],"repeat":"5","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":370,"y":300,"wires":[["a9610aec39003a2b"]]},{"id":"43c205f1871ca9fa","type":"inject","z":"a8b6a475c8d16c7d","name":"SENSOR B","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"control","payload":"trigger","payloadType":"str","x":370,"y":340,"wires":[["a9610aec39003a2b"]]},{"id":"a9610aec39003a2b","type":"q-gate","z":"a8b6a475c8d16c7d","name":"","controlTopic":"control","defaultState":"queueing","openCmd":"open","closeCmd":"close","toggleCmd":"toggle","queueCmd":"queue","defaultCmd":"default","triggerCmd":"trigger","flushCmd":"flush","resetCmd":"reset","peekCmd":"peek","dropCmd":"drop","statusCmd":"status","maxQueueLength":"1","keepNewest":true,"qToggle":false,"persist":false,"storeName":"memory","x":530,"y":320,"wires":[["bc1885523c19002e"]]},{"id":"bc1885523c19002e","type":"debug","z":"a8b6a475c8d16c7d","name":"debug 265","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":690,"y":320,"wires":[]}]