Well, it's amazing enough alone that the monk succeeded, IMO
But let's get down to business.
Assuming that Guy B does not have Improved Disarm, he will provoke an attack of opportunity from Monk A when attempting to do so. Monk A gets an attack at a -4 penalty, assuming he's not proficient with said greatsword.
If it doesn't hit, the disarm attempt continues. There are now opposed rolls to see if the disarm suceeds. Monk A has a net bonus of zero for bonuses, as he has +4 for a Two Handed Weapon, but a -4 for not being proficient. Guy B just accrues a -4 penalty, as his attack is unarmed, which is considered light.
Whoever wins the opposed attack roll wins the 'disarm' round. If Monk A wins, he keeps the sword. If Guy B wins, he gets his sword back.
Consulted the SRD the entire time, so I think that should be correct.
Edit: If Guy B does have Improved Disarm, Monk A would not get an attack of opportunity, and Guy B's opposed attack roll check would also have a net bonus of zero. -4 for light weapon, +4 for Improved Disarm