Upvote:4
First of all, let's note that a 2h20 self-connection is extremely risky, especially with passport control involved, visa-on-arrival procedures, etc.
Air India's check-in deadline is 60 minutes before departure, so you have 1h20 to:
That's probably already quite tight in normal circumstances (though I don't know how fast you can get through passport control), but if your incoming flight is late or there are any delays going through passport control or processing your visa on arrival, that quickly becomes impossible.
Remember that if you don't show up in time at the Air India check-in desk, you'll be considered a "no show", your booking will most likely be cancelled (usually all subsequent flights on the same ticket, like a return flight, will be cancelled as well), and you'll have to book and pay for a new flight, at the last minute, which usually means a lot more expensive. You may also have to find and pay for a hotel, meals, etc.
Now, if you still want to do that, what you are looking for an actual visa to enter Saudi Arabia. Remember also that for the first airline (Pegasus), your destination is Saudi Arabia. They don't care about your next flight, they are very likely not to let you board your first flight if you can't show them you can enter Saudi Arabia.
I see two options in your case: