Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
In our mosque, there isn't enough space to make two complete rows, so the Imam prays just one step in front of us (almost beside us), as in the following diagram:
Is this sort of congregational prayer allowed?
Yes, if situation doesn't support here in your case.
Related ruling, when two people pray together, they stand similarly like in your case.