There's a lot more to riding a mountain bike than simply moving weight in a linear fashion. You are constantly turning the bike over on its side, rocking it back and forth cranking out of the saddle, changing your center of gravity over obstacles, picking the front wheel up, pushing the bike out from under you. The list goes on an on. You spend a lot more energy than you think pushing the bike around.
Five pounds off the bike will ultimately benefit you more. Doubly so if the bulk is rotating weight. But it sure ain't cheap, and at some point there are trade-offs in durability to lose any more weight.
Five pounds off the body is never a bad idea either, assuming youre talking about losing fat and not muscle mass. If youre carrying around a bunch of extra weight, it will likely be easier to shed compared to someone who's already fairly fit. Dropping a few pounds of fat has cardiovascular benefits 24 hours a day, not just when on the bike. Your overall fitness will increase as you exercise, eat clean, and the bodyfat drops.
Both have benefits for sure, but in my opinion, bike weight trumps bodyweight all day every day. I regularly gain or lose 8 to 10 pounds in the course of a week, dependong on my gym routine and as I load or drop supplements. Most of it is simply water weight, but theres no doubt that I'm stronger when hiting the gym regularly, and taking my supplements and therefore carrying a few extra pounds. Now out on the trail, I'll be hard pressed to tell much difference week to week even with a 10 pound swing in body weight. However if you took 5 pounds off my bike, I would immediately notice. Climbs would be faster, but not necessarily just because I'm hauling less weight, but because theres less mass to move around as you pedal. Spend less energy moving a lighter bike side to side, and more of that energy can be put towards forward and upward propulsion. The bike will be easier move around trees, and less energy is spent pulling on the bars and pushing the back wheel forward to get over that log. Save energy there, and it can be reinvested to the pedals.
Anyway, one option takes a lot of money, and the other option demands a lot of work and dedication. Why not hit it from both ends? That's my take, anyway.