Answer: Work out at the gym
Explanation:
Opportunity cost of a decision is the next best alternative that would have been picked if the current decision wasn't made. For example suppose you would either eat chips or meat and you chose to eat meat. The chips are an opportunity cost of the meat.
In the same vein, the opportunity cost of going to library would be your next best (preferred) activity which in this case would be to work out at the gym.
In order words when you go to the library, you are giving up a chance to go to the gym.