The correct answer is the following.
With the death of the last Mughal emperor in 1707, Great Britain was able to strengthen its presence in India due to the division and confusion created by the situation. The structure of Power of the Mughal empire collapsed and that is when the British entered to control the territory.
After many years of prosperity under Emperor Shah Jahan, he was deposed by his son Aurangzeb. He spent too much money on waging wars and ended with the policy of tolerance that supported previous emperors. The Mughal empire finally ended in 1857.