Is Bob a fighter (edit: or knight or cavalier?)? Because it sounds like you're confusing opportunity attacks with a fighter's combat challenge.
Only two things provoke opportunity attacks: trying to leave a threatened square, and making a ranged or area attack while in a threatened square.
Typically, an opportunity attack is a melee basic attack.
Since opportunity attacks are melee attacks, not ranged or area attacks, they do not provoke more opportunity attacks.
On an ENTIRELY DIFFERENT topic, when a (weapon master) fighter has a creature marked, and that creature makes an attack that doesn't involve the fighter, the fighter can make a melee basic attack against them as an immediate action.
An immediate action is not the same as an opportunity action, even though the end result--you make a melee basic attack--is the same. And yes, if Bob has A marked, and A makes an opportunity attack against Jim, then Bob could use Combat Challenge to take an immediate action to attack A.
If this is what's causing your confusion, I'd suggest re-reading the fighter's Combat Challenge power, and the sections on opportunity and immediate actions.
EDIT: Also: defender's aura (for knight fighters and cavalier paladins) might also be the cause of your confusion, since those powers operate similarly (but not identically) to combat challenge. Re-read them.