y is positive so subtracting 7 from each side gives (y-7)=-2x
As you said, dividing by -2 on each side gives (y-7)/-2 = x
This answer is correct but I expect the textbook is the re-arranging the left-side which is confusing you
(y-7)/-2 = -(y-7)/2 = (7-y)/2