You have to move the unallocated space just above to the /dev/sda2
so that you can get the unallocated space into the extended partition.
Follow the below steps to increase the size of /root
partition and make sure that you had not mounted any partitions,
Boot Ubuntu live disk and open gparted partition editor.
Now right-click on the /dev/sda3
partition and select Resize/Move option.Now move the dragger to the extreme right so that the unallocated space will comes above the /dev/sda3
partition.
Follow the above step to move the unallocated space just above to the /dev/sda2
.
Now right-click on the extended partition and select the Resize/Move option.Now you can be able to add the unallocated space to the extended partition.
After adding that,the space comes just below to the /dev/sda6
.
Now right-click on the /dev/sda6
partition and select Resize/Move option to add the unallocated space to your /root
partition.