In the question mentioned above, since the available space is insufficient for the namazis; hence it is lawful to expand the mosque by including the shop and house in the mosque.
كما هو مذكور فى البحر، ولو كان بجنب المسجد أرض وقف على الوقف فأرادوا أي يزيدوا شيئاً فى المسجد من الأرض جاز ذلك بأمر القاضى (البحر الرائق 5/428)
The tenant does not have the right to occupy the shop and house rather he should immediately vacate it on the demand of the mutawalli and the concerned authority. In compulsion, it is also right for the locals to collect donation from the people and pay him some amount and get it vacated. But it shall not be lawful for the tenant to take the money.
Allah knows Best!
Darul Uloom Deoband