Blend the shallots and red onions and garlic into a smooth paste and set aside.
Blend the tomato into a puree
Heat 1 tbsp of oil in a wok or kadhai or a wide saucepan.
Add the cumin seeds and, when they sputter, add the onion-garlic paste.
Saute, stirring frequently to prevent the paste from sticking, for about 10-15 minutes or until the raw flavor of the onions has dissipated and the mixture has darkened.
Add the tomato puree along with the ground cumin, coriander, turmeric, and cayenne.
Cook, stirring frequently, until most of the moisture evaporates from the tomatoes.
Add the mushrooms and tofu cubes and stir well to mix. Add 1 cup of water, Mix well.
Cook for 10 minutes or until the mushrooms are tender and the flavors have blended. Add lemon juice, garam masala, and salt to taste.
In a small saucepan, heat the remaining ½ tbsp oil. Add the yellow onions and dry red chillies, if using. Saute for a couple of minutes or until the onions just start to turn translucent.
Add the onions to the do pyaza gravy. Stir to mix.
Add the cashew cream, mix, and stir in the coriander leaves.
Serve hot with some rotis or naan.