Answer :
The answer is A
the correct one should be "They all like horses, but none of them *had been galloping* while riding".
the correct one should be "They all like horses, but none of them *had been galloping* while riding".