For clarity and to stop confusion I'll refer to them as Person A and Person B.
Here are the facts as I am aware of them:
1) Person B changed their in-game name.
2) Person A claimed Person B's old name since it was now available.
3) Person A was later banned in-game.
It is really weird for Riot to ban a person for taking someone else's old name. This, in itself, is not a punishable offense to my knowledge. The only punishments for our summoner names that I am aware of are for impersonating Rioters or having a name that is indecent/offensive.