Do you really believe that the religion of Abu Bakr is the same as the religion of Muhammad?

After the battle of Badr, our prophet Muhammad pbuh released the disbelieving captives in exchange for a simple price: just for one of the captives to teach reading and writing to a group of Muslims.
These captives–who were released by the generous, merciful Messenger, the example for mankind–didn’t believe in Muhammad pbuhap. In fact, they fought a battle in which they wished to kill and destroy him. But what the Prophet Muhammad pbuhap did was exactly what we know and would expect based on the morals of the prophets and the righteous ones. We also expect this from all those who gave noble examples of human morals so that people might imitate some of their actions, such as Gandhi and Mandela