Preheat about 1 Tbsp of oil and pan fry the tofu until golden brown on all sides. You may skip this if you want, but I like it pan-fried before adding to the mixture below
Heat oil in a wok or skillet. Briefly fry the stink beans until fragrant, about 2 minutes. Remove from the wok or skillet and set aside. Add galangal and stir fry for another minute. Add shallots, garlic, tauco and stir fry for about 3 minutes or until fragrant and soft
Add both green and red chili, stir fry for another minute. Add the shrimp and stir fry until they started to turn pink. Add hot water and bring to a boil. Add the tofu pieces, petai, and sugar. Have a taste. The final taste should be savory with some sweetness. Adjust by adding more tauco if it's not salty enough to your taste
Remove from the heat and serve immediately with a rice or lontong