Shouldn't "Моя подруга дуже гострий на язик." be correct since язик is masculine? It is marked wrong for me. Or does гостра refer to подруга? If yes, further explanation would be welcome.
Yes, basically in English we're talking about having a sharp tongue, so sharp modified tongue, in Ukrainian we're talking about the friend being sharp. It literally means something like "My friend is sharp in terms of the tongue", or even more literally "My friend is sharp at his/her tongue". Which doesn't really make much sense in English, I know, but I hope you get the point - "sharp" modifies "friend". So:
Моя подруга дуже гостра на язик.
Мій друг дуже гострий на язик.
Hope that helps.
And that was a good question.