How do you do this?

a pineapple drink contains 15% pineapple juice. how much pure pineapple juice should be added to 8 quarts of the drink to obtain a mixture containing 50% pineapple juice?

Let X be the amount of pure pineapple that you must add, in quarts. The amount of pure pineapple in the mix will be
(0.15)*8 + X
This must equal the amount of water (or non-pineapple ingredients), which is 0.85*8.
1.2 X = 6.8

Solve for X

Caleb has 1 liter of a mixture containing 42% boric acid. How much water must be added to make the mixture 6% boric acid?