The ratios of the number of sweets Abigail has to the number of sweets Ben has is 4:5 at first. After Abigail bought another 16 sweets and Ben ate 2 sweets, Abigail has thrice as many sweets as Ben. How many sweets did Ben have in the end?

let the sweets of Abigail and Ben be 4x and 5x

( note 4x : 5x = 4 : 5 )

A bit later ....
Abigail has 4x + 16
Ben has 5x - 2

"Abigail has thrice as many sweets as Ben" ---> 4x+16 = 3(5x-2)

I will let you finish it.

(You should get Ben has 8 at the end, and Abigail has 24)