The physicists answer(and believe me, I am not a physicist)
The total weight is the same in both cases, and thus would require the same amount of work/power to climb "x" units of elevation gain.However, the bike has no ability to generate any power, unlike the rider. Can I be as bold to assume your question would be based on the premise that a heavier rider would be able to generate more power than a lighter rider(definately not always the case as fat and muscle both have mass, but fat does not generate any power to drive the bike), in which case, the light bike is easier.
First of all, the whole idea depends on the rider and the bike. If it is the same person who puts on 20 lbs of muscle and loses 20lbs on their bike that person would obviously be more effecient.
If the 180 lb rider was 6'2" and lean and the 200 lb rider was 5' I'd bet the leaner guy could huck a bigger rig just because he is in better shape, assuming the 5' guy isn't all muscle.
It 100% depends on the rider and the variables. Either way if both the people are athletic, the lighter bike will go up easier.
All I'm asking is whether 20lbs on the rider or on the bike, both adding up to 220lbs, going up a hill, which is easier and why?
It will come down to the wheelset it you ask me. The less rotating mass on the wheels, the easier they will spin up and then easier the climb will be. Rotational mass factors pretty close to 3:1 as I understand it so for climbs, you want the weight anywhere but the wheels....
My bike is about 35lbs and I pedal the damn thing up anything. The 819s spin nicely and seem to make the climb easier than the Ryno XLs I used to run. That said, I could get up most hills with the RLs also but it took a lot more work (the difference in wheel weight is only maybe a pound).
I think the 'riders' are identical physically and we're discussing hypotheticals vs physics of weight distribution and rotating mass on the bike itself vs extra weight on the rider.
Well I'm 225lbs now and my bike is 22 lbs and I can rip up a hill faster than some dudes at 160lbs...I use to be 180 and had a DH bike and I could still climb but, man it was so much harder...the geometry of the frame makes a huge difference