My initial thoughts:
- I'm surprised that adjoining townhomes could share DWV, not sure on the rules on that. If it is allowed, it may be that any new/replacement work in the common wall will have to be all in metal rather than plastic, something to check.
- I was going to say that a double elbow isn't to be used horizontally like that. Then I recalled that the IPC allows quarter bends to be used horizontally on fixture drains, like for a lav. But it won't be a fixture drain once they combine, so I'm still thinking the double elbow is not to be used like that. Bears checking, although likely moot as you'll likely have to remove it.
- If there's not a vent for the lav(s) upstream of that double elbow, then the vertical offset of the combined drain at the san-tee violates the trap weir rule. The top of of the side entry of the san-tee (the vent connection) has to be at a higher elevation than the bottom of your sink trap outlet.
So assuming that you can't/don't want to cause your neighbor to change anything, then I think you need to raise the san-tee at the stack to fix the trap weir rule violation. Then replace the double elbow with a combo, since you want to move your lav to the left.
If you could get your neighbor to install an AAV on their lav, and if you install an AAV on your lav, then you could omit raising the san-tee at the stack, although reliance on AAVs is a less robust solution.
And I'm assuming nothing is draining down the stack from above.
Cheers, Wayne