A is correct, however just a small adjustment to B would also give a correct sentence, but with the opposite meaning. Using A means that he could not listen to the radio because he was talking to other people. Taking B and adding 'to' after listening would mean that he couldn't talk with other people because he was listening to the radio.