Short answer is that you can get them pretty close, but it's going to take some care while staining.
Oak and walnut have similar grains, so with proper staining, they can look pretty similar. Assuming it's common red oak, your oak might have a slightly more reddish tint to it. White oak won't have that, but it's less common and generally more expensive. Pine is more yellow in color and has a less grainy appearance than either oak or walnut, but as it's being used on the ceiling it will be much less noticeable.
My suggestion would be to take the finished newel post into your local big box or woodworking store and carefully match it against stain samples. Lots of those types of stores will have the samples on red oak and pine, as they're very common woods. The key is to look for hue, not darkness. Stains can be lighter or darker depending on how much you apply, so that much you can control. The actual color is determined by the stain. You'll also want a clear coat to protect the finished product - make sure you use compatible stains and clears (don't mix oil-based and water-based products - they don't like each other).
Woodworking stores will probably have a better selection, better quality stains, and/or more knowledgeable staff on average. I won't disparage big box retailers because I used to work at one, and the folks I worked with were pretty knowledgeable. Your experience may vary.
Since the oak is going much closer to the walnut, pick a stain that looks best on the oak even if the pine sample is a little off.
You can find lots of great tutorials on staining oak and pine on the internet, like here and here. Pre-conditioner helps keep the stain uniform, which is especially tricky with pine due to its general softness and uneven porosity. Use cut pieces from sizing your stair treads and box beams as samples to practice and refine your prep and staining until you're satisfied.
You can also probably find a wealth of information on staining techniques on the Woodworking Stack Exchange site.