Let x be the amount of apples that Kevin bought.
It says that john buys three more than twice the amount of apples that kevin buys, so 3 + 2x apples.
They bought 21 apples total, so x + 3 + 2x=21
Collecting like terms gives 3x+3=21
Subtracting 3 from both sides gives 3x=18 and then dividing both sides by 3 gives x=6
x is the amount of apples kevin bought, so kevin bought 6 apples