Cover lentils with water and simmer until tender about 30 minutes. Add more water if necessary. Fry the chopped onion in half the oil until soft and golden. Add to cooked lentils. Season with salt and pepper. Add rice and another cup of water. Cover and simmer gently for 20 minutes. Fry the sliced onions in the rest of the olive oil until dark brown. Heap rice and lentils onto a plate and garnish with carmelized onions.