In general, what you do is focus on the functional groups in the molecule at hand and see how they react with the specified compounds.
So, you have an olefin, how do these react with peroxide, then in turn how do these react with hydroxide?
Of course, these had to be worked out a while back from scratch using spectroscopic techniques and the like, but at this level the reactions are fairly infallible and don't give (significant) amounts of byproduct.
S