Ad hominem is a good way to describe this. Costa noticed his professor's flaw in reasoning, but failed to condemn his own similar reasoning about a different subject. It doesn't matter if Costa is right or wrong about French opera, because Austrian painting is the issue at hand.
Even if Costa did make the same error, does this make his argument any weaker? No, because we need to evaluate the argument itself, rather than the person making it. You had the right idea about ad hominem, which is why C is correct.