Using "hearing ..." say what you were doing as you were writing. But that's not quite right. You probably heard that they wanted to buy flowers, and then wrote to them later.
So you could say "Hearing that you want to buy flowers, I decided to write..." If you made the decision as you heard. It would be the same with "Learning..."
You could use a participle phrase in the perfective form "having heard" (not heared) to mean that at the time of writing you had already heard.
But this is all unnecessary and not good English. The participle phrase makes the sentence drag out, especially in the "having heard.." form. It is over-formal and sounds pretentious. You should use a proper clause linked with a conjunction so we know what you mean.
I heard that you wanted to buy flowers, so I'm writing ...
(I assume this is a school assignment. The context of writing to someone to give advice on buying flowers, without them asking for it, is quite strange)