You say 'ainni if you are talking about yourself and 'ainna if you are talking about a group of people. In other words "O Allah help me" and "O Allah help us" respectively. So, the imam at the masjid did so as he was doing a group duaa and asking Allah help "us".