Mami could entrap Homura with her ribbon at any time, but decided to play fair and square during the duel − she didn't use the ribbon to her advantage. The whole gun duel was Mami's way to show that Homura can't beat her and do whatever Mami thought Homura was planning to do.
When Homura stops time after throwing away her gun, Mami's face changes from satisfied smirk to focused, alerted expression. Mami doesn't know what Homura might do next.
When Homura tries to, what appears to be, commit suicide by shooting herself in the head, Mami gets scared and tries to save her as she pulls the trigger by grabbing the ribbon and pulling Homura away.
At this point, it becomes apparent that Mami never wanted Homura's death. After all they were just drinking tea together peacefully a few moments ago. Mami's intent to keep Homura alive overweights the will to keep attached to her with the ribbon, and so the ribbon gives in to the bullet and tears up, letting Mami out of contact with Homura, which in turn freezes Mami.