In this question, the gears are connected to each other their perimeter. This will cause the distance of rotation for both gears will be the same. But the gear A is bigger, thus having a higher perimeter.
Part 1:
A full rotation or 360 degrees rotation will have a value of 1 perimeter. Then, we can determine the distance from gear B rotation and find out how much the gear A move distance
gear A distance= gear B distance
gear A distance= 1 * (22/7) * 2 *2
If the distance converted into degrees, then:
gear A rotation= gear A distance/ gear A perimeter * 360°
gear A rotation= (22/7) * 2 *2/ {(22/7) * 8 *8} * 360°
gear A rotation= (1/16) * 360°= 22.5 degrees
Part 2:
The problem is similar to part 1 but the number is reversed.
gear B distance= gear A distance
gear B distance= 1 * (22/7) * 8 *8
gear B rotation= gear B distance/ gear B perimeter
gear B rotation= (22/7) * 8 *8/ {(22/7) * 2 *2} = 16 rotation