Using gerund without axillary verb

Can someone explain the use of "tratando de" in this sentence (from Harry Potter). I see the gerund all the time without an axillary verb but whenever I look it up, I read that you are definitely not supposed to use the gerund without an axillary verb. So why is it so in the sentence? Is there an exception to this rule? Thanks for your help in advance!

"Mientras tío Vernon llamaba a la estafeta y a la lechería, tratando de encontrar a alguien para quejarse, tía Petunia trituraba las cartas en la picadora."

submitted by /u/amammen1212
[link] [comments]