Bring a large pot of salted water to a boil. Add potatoes and cook until tender, about 15-20 minutes. Drain and mash potatoes. Mix in butter and finely chopper onion. Add salt and pepper.
Next, bring a large pot of salted water to a boil and add carrots. Cook until tender but still firm about 15 minutes. Do not overcook as you will be adding them to the oven at the end. Drain, mash and set aside. Preheat oven to 375° F.
Heat oil in a large frying pan. Add onion and cook until clear. Add ground beef and cook until well browned. Pour off excess fat, then stir in flour and cook 1 minute. Add ketchup and beef broth. Bring to a boil, reduce heat and simmer for 5 minutes.
Spread the ground beef in an even layer on the bottom of a 2 quart casserole dish. Next, spread a layer of mashed carrots. Top with the mashed potato mixture.
Bake in oven for 20 minutes, or until potatoes are golden brown. Serve while warm!