We can set up an equation to solve for the amount of cookies sold by #64:
[tex]total = troop64cookies + troop27cookies\\365 = (20 + 2x) + (x)\\365 = 20 + 3x\\345 = 3x\\x = \frac{345}{3} \\x = 115[/tex]
Now we know that TROOP #27 sold 115 cookies. We still have to find how many cookies TROOP #64 sold.
[tex]troop64cookies = (troop27cookies * 2) + 20\\troop64cookies = (115 * 2) + 20\\troop64cookies = 250[/tex]
We now know that Troop 64 sold 250 cookies.
We check our answer by adding the 250 cookies from troop 64 and the 115 cookies from troop 27, to find that the total is 365.