Most of us here would recommend riding a real bike outside for exercise. Forty minutes on a technical mountain bike trail will give you what you need and is a lot more fun than pedalling nowhere in a gym. I'll say the same goes for hiking versus stairclimbing.
However, if you insist, it does not matter whether you use a stair climber or exercise bike for weight loss. So long as you get your heart rate up to the same level on each, they will burn the same number of calories. The two tend to work muscles a bit differently though. Stair climbers are better for glutes, bikes are better for quads.