How do you react A and B, if they are nucleophiles you would get an alcohol?
I see no way to selectively protect one aldehyde, even worse if you dont define the chain between them.
If you have a alkene with one aldehyde group you can do the manipulation of the aldehyde and then cleave the double bond with OsO4/NaIO4 to get the other aldehyde. You can also have a 1,3-dithiane or acetal similar.