Jonathan P. answered 09/04/21
Tutor
4.8
(375)
Experienced, Patient Computer Science Tutor (UC Berkeley Grad)
So assuming you meant to put another name we will say Gregg and Nameless
Greg: q + p
Nameless: 4q + 8p
So assuming you are given q and p:
The sum of their coins will be Greg + Nameless = ( q + p ) + (4q + 8p) = 5q + 9p