Chop the onion finely and saute it. Once it changes color, add the cleaned and chopped mushrooms.
Once they saute as well, add the washed rice. Pour in 1/2 cup water and stir periodically until the rice swells.
Season with salt and black pepper. Transfer to a baking tray. Pour in another 3 cups water. Arrange the washed and salted chicken legs on top.
Bake in a preheated oven until ready.