hello!
1. either would be correct, as well as 'for whom did she buy flowers'-although generally in English, whom isn't too commonly used, so the second would be more usual.
2. 'what did I buy cheese for' would make more sense!
3. 'Whom did I send a letter' or 'who did I send a letter to' both make sense. For the second part, it would be 'how did I send the letter', or maybe 'by what means did I send the letter', if you want to extend your sentence!
hope this helps!