Let's denote the amount of the 30% solution as \( x \) (in grams) and the amount of the 60% solution as \( y \) (in grams). John needs a total of 20 grams of the 54% solution.
The problem can be expressed as a system of two equations:
1. The total amount of solution: \( x + y = 20 \)
2. The total amount of acid: \( 0.3x + 0.6y = 0.54 \times 20 \)
Now, solve this system of equations to find \( x \) and \( y \), which represent the amounts of the 30% and 60% solutions, respectively.