In this case, it seems that there is no version control. Too bad.
你老公千万不要主动去揽活。
1.先想一想各种可行方案。一定要想好对应方案先。
2.想好后将现在的情况告诉上级。让上级去告诉A把程序该回去。程序现在不对是A的责任。他记得记不得不关键。虽然公司有新的policy大家都可以改,但改的人如果不懂业务就改该是他的错,这还是比较初级的。而且,他不document改动也是一个错。一定要强调A做事没follow development process, and that's root of the problem. This way no one will think it is company policy.
3. let A to change first. If he couldn't do it and the company lets your hu*****and to take over, then he will have to step up. This way he will take the credit not the blame. But make it look difficult to solve, no matter it is true or not.
If it is very important, I think it is better to reach B first unless it was told not to bother him. No boss likes you go over to his boss.