I've done a lot of wilderness catering including a 3-tier wedding cake for 30 people on Half Dome.
Depending on the timing during the trip, there might be a MUCH easier way. If it is in the first day or two: make a cake that travels well, freezes well and is dense (small volume). A low-flour or flourless chocolate torte is one. A Marzipan cake is another. They are both pretty high-calorie cakes but you're hiking, right? Reward yourself.
Bake it in advance. Freeze it solid. Wrap in clothing, sleeping bag: Torte in a plastic bag wrapped in a fleece sweater wrapped in a plastic bag, placed in the middle of an over-sized sleeping bag stuff sack with the sleeping bag all around it.
Clothing makes GREAT insulation (duh). And just in a sweater, plastic bag and a towel, I travel with 2-3 pounds of frozen fish for 12-18 hours all the time and it is still frozen (but not hard frozen) 2,000 miles later.
Things that help: Keep it frozen till your departure. Ask the hotel to put it in their freezer (mark with room number, guest name). Have it ALL in the freezer - the cake in clothing, all wrapped up. Use an ice chest to get it to the tralhead. If it is small enough, put the whole ice chest in the freezer at home and at the hotel on the way. Goodwill / Salvation Army have lunch-box sized ice chests for a few dollars.
Presenting an intact b-day cake is impressive on a hike (bring mini candles), but pre-cutting lets you pack the pieces tighter.
Medical office get little styrofoam ice chests for drugs and vaccines and would probably give you one. About 4" x 6" x 6" on the inside, so you have to pre-cut the cake. Pre-cut, place in little cooler, wrap cooler in clothing, freeze the whole thing and you could get 2 days in cool weather. And it it thaws early? That's fine. Either of those cakes would be fine at room temp for 12-24 hours. I've actually found these techniques to work so well I have to check cake temps on the way and often unwrap things 2-4 hours in advance so it's not frozen solid at serving time.
I'd bring a can of spray whip cream to serve with it. The chocolate torte is good with a raspberry sauce. Not jam, but just boiled down raspberries with a bit of sugar. For the marzipan, I'd bring a dark-chocolate sauce in a plastic container for reheating and maybe some canned sour cherries (open, drained and repackaged) to serve on the side.
My son turns 12 on March 1. And he did GREAT on a Bright Angel-River-Bright Angel hike in 9 hours last May. Have a great trip!