Where does the ideology of afterlife in Buddhism and Hinduism come from and why are they different?
Hinduism teaches about a permanent soul that goes from life to life until it reunites with the universal soul called the Mahabrahma. Buddhism says there's no soul going even from this moment to the next, let alone from life to life. Both mind and body are processes of causes and effects. There's nothing permanent within you that can qualify as a soul. Read about Paticca Samuppada. Buddhism also rejects the belief of a universal soul.
Where does the ideology of afterlife in Buddhism and Hinduism come from...
In Hinduism it comes from Vedas and Upanishadas and belief in that. Buddhism is way of life. It is not much about 'what after life?' It shows us better way to live. Nothing in Buddhism comes from blind faith on scriptures.
...why are they different?
They are different because both the religions are basically different. Buddhism is not just different from Hinduism but is essentially against Caste based discrimination which is core of Hinduism. Rebirth and after life are the central concepts in Hinduism. It is Brahminical religion which believes not on deeds but on birth.
I think I have tried to answer the question. Would like to know if I am wrong.
In Buddhism rebirth comes from the concept of mind. The mind is a formless continuum. Each moment of mind arises from the previous moment then subsides to give rise to the next. Mind has a connection to the body but is separate. It does not arise from the body. Death is when the mind and the body's connection is severed. At that point the mind does not cease but rather gives rise to other appearances. First the bardo, the intermediate state, and then rebirth in a new life.
This can be understood by analogy to dreams. When we sleep the appearance of our waking life dissolves. Latter in the night a dream world appears. That lasts for some time then dissolves and another dream world may arise. Each appears real and we relate to them. Then we wake and our waking life appears. Going from life to life is much like going from dream to dream.