A good quote for a friend grieving the loss of a mother is, "I have no idea what you are going through in losing the single most important compass in life." It can help to add, "Please know that my heart is with you during this time of incredible loss."
If the speaker was personally familiar with the friend's mother, a good quote to express sympathy is, "Your mom was such a lovely woman. I often think about all the times we spent together and all the amazing meals your mom cooked. She was such a pleasure to have around. I have learned so much from her and will remember her always. I love you and am truly sorry for your loss."
If the speaker did not personally know the mother before she passed away, a good phrase to express condolences is, "My heart aches for you and your family during this time. Your mother touched many people who no doubt miss her already."
It is good to remind the surviving child that while their mother has passed, her memory is not gone. A good quote to express this is, "You have become a reflection of your mom throughout your life, from the way you treat everyone with respect and empathy, to your love for children. Your mother's legacy lives on through you."