The ratio of the number of beads in Ashley's bag to those in Anna's bag was 4:1. Ashley gave half of her beads to Anna. Anna then had 7 more beads than Ashley. How many beads did Ashley have at first?

As = 4 An so An = As/4

(1/2) As = An - 7
so
As / 2 = As/4 - 7
multiply everything by 4
2 As = As - 28
As = 28