Jacob went to the grocery store and bought bottles of soda and bottles of juice. Each bottle of soda has 25 grams of sugar and each bottle of juice has 10 grams of sugar. Jacob purchased a total of 12 bottles of juice and soda which collectively contain 240 grams of sugar. Determine the number of bottles of soda purchased and the number of bottles of juice purchased.

Let s be the number of bottles of soda and j be the number of bottles of juice purchased.

You know that s + j = 12 and 25s + 10j = 240.
You can solve the first equation for s to find s = 12 - j.
Plug that into the second equation to find 25(12 - j) + 10j = 240.
Multiply through the parentheses to get 300 - 25j + 10j = 240.
Combine like terms to get -15j = -60.
Divide both sides of the equation by -15 to get -15j / -15 = -60 / -15.
Simplify the equation to get j = 4.
Since s + j = 12, then s + 4 = 12.
Subtract 4 from both sides of the equation to get s = 8.
Jacob purchased 8 bottles of soda and 4 bottles of juice. Answer: \boxed{8, 4}.