Cut the potatoes into smaller pieces and boil them in salted water. Add the rosemary and let the potatoes cook until soft.
When the vegetables are almost done, add the tomato juice, season with salt and pepper, and let it simmer for 10 more minutes. Then, remove from heat.
Mash the boiled potatoes with a little cooking water, season with salt, pepper, add the oil. When everything becomes creamy, transfer the mashed potatoes to an ovenproof dish, spreading it evenly, add the vegetable sauce, and place the dish in the preheated oven at 200 degrees Celsius for 10 minutes.