You use the expression ‘The Best of Both Worlds’ to describe a situation in which you can enjoy the benefits of two different opportunities.
Example of use: “Not only does Don have the freedom a student enjoys, his fellowship at the university means he also gets paid. It really is the best of both worlds.”
The origin of the expression ‘the best of both worlds’ isn’t really known. It became popular in the latter half of the 20th century.