To achieve what I think you want to do take the following steps after backing up any important data:
- Boot gparted live (you cannot move sda9 while it is mounted by your Ubuntu install)
- Move sda5 so that it is adjacent to sda8
- repeat for sda6 so that it is adjacent to sda5
- likewise for sda9, then sda7, then sda10. At this point all the unallocated space should be at the right hand end of sda8
- Next you should now be able to shrink sda8 so it contains no unallocated space
- Finally you should be able to create a fourth primary partition in the unallocated space for your Windows install.
At each step select the partition you are working on, right click, and use the Resize/Move option. You have to click the green tick icon to apply what you have specified using the Resize/Move option. You can specify more than one change before applying it but I would recommend doing it step by step.
If this is not detailed enough I suggest searching youtube for "Gparted Move". you will get plenty of videos returned that will demonstrate Gparted