Extended $lookup

I need to solve everything in just one query.