I found out that namaz first became compulsory during miraj (621 AD). Which means only year before hijrat in 622 AD.
Still don't know about the addition of two rakats, whether it is true or not.
Ummat-e-Muhammad pr ibtada rasalt mein (Rasool Ban ny ka shuru zamana) mein Fajer or Maghrib ki 2 namaz farz thi. Hijrat (from Maccah to Madina) se dhair (1,1/2) baras pehlay jab Nabi ko Miraj how to us waqt 5 namaz farz howin.