"Get along well" means that they work well together, or that the don't fight with each other or have any anger between them and they have fun together as friends.
"Hang around with" just means that they are together at the same place.
Your sentence means that even though they get along well, they don't get together, it hang around each other, unless Robert is there (acting somewhat like a bond between the two)