Halve tofu lengthwise, then cut crosswise into 1/2-inch-thick slices and pat dry well. Put 1 tablespoon soy sauce in a wide shallow dish, then add tofu, turning to coat, and let stand 10 minutes. Pat tofu dry. Heat oil in a 12-inch heavy skillet over high heat until hot but not smoking, then add tofu in 1 layer and cook, turning over once, until tofu is browned, about 6 minutes total. Transfer with a slotted spoon to a large plate, reserving oil in skillet. Add garlic, ginger, and red pepper flakes to skillet and saute, stirring, until fragrant, about 30 seconds. Add beans, bell pepper, and salt and saute, stirring, 1 minute. Stir in coconut milk and remaining tablespoon soy sauce and bring to a boil, then boil, uncovered, until beans are tender, about 6 minutes. Transfer vegetables using a slotted spoon to plate with tofu. Simmer sauce until thickened slightly and reduced to about 3/4 cup, about 2 minutes. Stir in lime juice and pour sauce over vegetables and tofu. Sprinkle with cashews.