BUT... Dr M has a mind of his own, and probably has his own hidden agenda.
He might want to resurrect his "Crooked Bridge" to replace the Causeway. He might want to ensure that his legacy, the Proton lives on as the National car.
And after UMNO has replace Najib, who knows?
So would Dr M step down when Anwar is ready to take over?
That would be interesting to see.
Dr M's party "Bersatu" has 12 seats in Pakatan Harapan, the opposition alliance that is forming the coalition government. If he does not toe the line and do his one job (warming the seat for Anwar), Bersatu could be ejected from PH. And with that, the end of Dr M as PM.
BUT... PH would be left with just 101 seats and that is NOT enough to form a coalition govt! (They need 112 minimum.) How?
Adding PAS to the Coalition
Inviting PAS to join the coalition seems to be the obvious solution... if you ignore the fact that the other major component of PH is DAP. PAS and DAP together in a coalition govt? Not impossible, but unlikely. And difficult.
Bringing in all the others
If Warisan, STAR, and the three independents were to join the PH less Bersatu, they would have... 113 seats! Back to majority.
But it would be a fragile majority, even assuming it could work. If Warisan was willing to be part of the coalition, why didn't it join in the first place? And why are the independents independent? Would they be willing to join a coalition? Would they be willing to give up their independence and accept party (coalition) discipline?
Even if all the questions were settled, it would still be a fragile coalition with just 113 seats. Barely over 50% of the seats in parliament.
But that is all assuming that all the alliances and affiliations are stable. If I understand correctly, Malaysian MPs can switch alliances/allegiances without losing their seats.
So even as PH ejects Mahathir and Bersatu, it may be that some BN component parties/MP may break away from BN and join PH, bringing their numbers back above majority.
Or Dr M, after ensuring that Najib has been dethroned from UMNO's leadership, may lead Bersatu back to UMNO. Then BN (with Bersatu) could ally with PAS, and based on the current numbers, they would have 109 seats. They just need 3 more seats for BN to be back in power. This could be from defecting PKR or Amanah MPs (DAP would be very unlikely), or the independents, or STAR, or Warisan.
And then BN would be back in power.
Amendment 13 May 2018
The above was written with the information available to me at the time. Since then I have discovered that the coalition government has 124 seats in parliament as PH has form a coalition with Warisan. And the situation is still fluid. This was in wikipedia:
The following day afterwards, two Sabah-based Barisan component party, the United Sabah People's Party (PBRS) and the United Sabah Party (PBS), announced that they will also leave Barisan. PBRS stated that they will apply for membership in the ruling party coalition, Pakatan Harapan, while PBS stated that they will form a new Sabah-based coalition, compromising of all Sabah BN parties. On the same day, 3 Johor BN assemblymen announced that they have defected to PPBM, giving Pakatan a two-thirds majority in the Johor State Legislative Assembly, while 2 Perak BN assemblymen announced that they will also defect to Pakatan, giving Pakatan the needed mandate to form the state government in Perak, ending the hung parliament status-quo. Perak Pakatan Chairman, Ahmad Faizal Azumu, was later sworn in as the new Perak Menteri Besar. Subsequently, two independent MPs, Jugah Muyang, who won in Lubok Antu, and Larry Sng Chee Hua, who won in Julau, announced that they have joined PKR, increasing Pakatan's tally in the Dewan Rakyat to 124. Jugah Muyang won in a three-cornered fight against both Barisan and PKR, while the latter was endorsed by Pakatan against the BN candidate.There was 121 seats (PH 113 + Warisan 8), then PBRS (1 seat) quit BN to join PH. Then 2 independent joined PH. So 124.
This means that some of the scenarios are still working themselves out.
If Bersatu exits PH (with 124 seats), PH would still have 112 seats which would be enough to hold onto the govt.
On the other hand, if Dr M decides to turn on PH, and leads Bersatu out of PH and allies with BN and PAS, the alliance/coalition would have 107 seats. They will need to turn Warisan (8 seats), or some of PH's MPs either as a bloc or individually to make up the shortfall of 5 seats.
In either case, the coalitions would be fragile.