For the Tomato and Garlic sauce: Pour olive oil into a medium-sized saucepan set over medium heat. Add garlic and cook until fragrant, about 30 seconds. Add the tomato sauce. Simmer until slightly thickened, about 10 minutes. Add the water and vinegar, and turn the heat to high. When it starts to boil, immediately turn off the heat. Transfer to a medium-sized bowl, season with salt to taste, and set aside.
For the Koshary: Pour one tablespoon of olive oil into a large, heavy skillet set over medium-high heat. When shimmering, add onion and stir well. Once coated in the oil, reduce heat to low and cook until heavily caramelized, about 45 minutes to an hour. Stir often.
Meanwhile, preheat the oven to 350°F Also, fill a medium-sized pot with water, salt heavily and bring to a boil over high heat. Cook the pasta until al dente, then remove to a bowl with a strainer. Toss with 1 tbsp olive oil.
Bring water back to the boil. Add the lentils, and then reduce heat to medium-low. Simmer until cooked, but still al dente, about 15 minutes. Drain lentils and set aside to cool.
Pour two tablespoons of olive oil into a dutch oven set over medium heat. Add the cinnamon sticks and stir until fragrant. Add the cardamom, cumin, and rice. Stir well; cook until the spices are aromatic and the rice is mostly opaque. Add water. Bring to a boil, stir well and cover. Place in the oven and cook for 13 minutes. If done, fluff with a fork, and season with salt to taste.
Place a skillet over medium-high heat. Add 1/2 tablespoon of oil. When shimmering, add the pasta. Let it cook undisturbed for about a minute, or until it begins to get brown and a little crusty on the bottom. Toss well, and cook until it is toasty and slightly chewy. Transfer pasta to a bowl.
Add another 1/2 tablspoon of oil to the pan. When shimmering, add the lentils and cook them until they are slightly toasted, about 30 seconds a side. Transfer them to another bowl.
Scoop out some rice onto a plate. Top with a scoop of pasta, lentils, tomato sauce, and some of the caramelized onions.