"giving two somethings" is a euphemism for "giving two sh*ts" or similar vulgar expression. "(giving) a flying something else" is a euphemism for "(giving) a flying f***" or similar vulgar expression. Both expressions, normally used in the negative, mean (not) to care at all about something.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.