To Prepare White Sauce: Melt 3 teaspoon butter in a deep pot. Stir in the flour. Add the milk. Stir until the sauce thickens. Set aside.
Peel and slice melongene and potato. Place in a deep heavy pot and fry together in 1 teaspoon butter and oil for about 10 minutes on a low flame. Stir occasionally. Set aside.
Finely chop the onion, garlic and pimento and saute in butter. Add the tomatoes. Then add the baked beans.
Place half of the melongene and potato in a cooking dish. Layer with the sauce and the peas. Sprinkle cheese and continue with the next set of layer.
Bake for about 1 hour in a 400°F oven.