The first thing we have to do is identify what our variables are
![\begin{gathered} P\to\text{Popcorn} \\ C\to\text{Candy} \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/bxpl73wr2i1t8xe2p930o6lwxlunav95ck.png)
Now we want to know how much a bag of Popcorn is worth and how much a candy bar is worth.
For this we have 2 equations one for what Tory sold and another for what Jake sold
![\begin{gathered} 28P+40C=282\to\text{Tory} \\ 28P=282-40C \\ P=(282-40C)/(28) \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/fvy8fvehtkagpic43qpw4bnjhcl4tnqmi3.png)
![\begin{gathered} 17P+20C=160.50\to\text{Jake} \\ 17P=160.50-20C \\ P=(160.50-20C)/(17) \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/xwwrqxk37yox64jtikxm45030iwmjvkqv6.png)
From the 2 equations we solve for P, then we equalize them to be able to find the value of C
![\begin{gathered} (282-40C)/(28)=(160.50-20C)/(17) \\ 17(282-40C)=28(160.50-20C) \\ 4794-680C=4494-560C \\ 680C-560C=4794-4494 \\ 120C=300 \\ C=(300)/(120) \\ C=(5)/(2) \\ C=2.5 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/79bcfxz2jpucp5tdyluxr05sf2o8yy3tpg.png)
Now we know that a candy bar costs $ 2.5 we use any of the initial equations to find the value of the price of bags of popcorn
![\begin{gathered} P=(282-40((5)/(2)))/(28) \\ P=(282-100)/(28) \\ P=(182)/(28) \\ P=(13)/(2) \\ P=6.5 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/nuxtssdz11ip1ej8w4sa4xaowmrceq8tn7.png)
So the answer is: The value of a bag of popcorn is $6.5 and that of a candy bar is $ 2.5