How is India going to qualify?
India will qualify with a win in Ahmedabad. While a loss or even a draw would take control of their fate and force them to rely on New Zealand to qualify. Sri Lanka is the only other team that can qualify for the World Cup final at the expense of India.
If India loses or draws the Ahmedabad Test, New Zealand should win or draw at least one of the two Tests against Sri Lanka.
India wins the series 2-1, while Sri Lanka wins 2-0 in New Zealand.
Sri Lanka would pass in this case. The ideal scenario for India is to win the series 3-1 and advance to the final without assistance. Even if India is unable to do so, they can rest easy knowing that New Zealand has a good record at home, having recently held England to a 1-1 draw.
It will be difficult for Sri Lanka to win 2-0, especially given their recent Test performances.