How do I match the color of old wood with stain after a repair?
Most of the wood finish displays at your local home center will have samples. They will show what the finish looks like on various wood types. The issue with matching older trim is the colors change as the product ages and there are variations from batch to batch. I have had the best luck by bringing an original sample and matching it to the display for similar wood. If it is close but a little light you can try multiple coats to see if it will darken. You can also add a few drops of a darker or colored stain  in small batches to alter it slightly. Try various mixes of finish on multiple scraps of the replacement wood keeping track of the formula of each sample.