Hello Tayyab, and welcome to the forums!
your VM has two disks attached. The first disk is used for the C: partition, the second disk is used for an E: partition and has some unallocated space.
If I understand you correctly then you want to make the first disk bigger, because you need more space available on the C: drive. And you want to make the second disk smaller to get rid of the unallocated space.
While it is easily possible to enlarge a virtual disk (this can even be done online while the VM is running) there is no way to reduce the size of a virtual disk.
As a workaround you can do the following:
1. Add a third disk to the VM that has exactly the size that you need for the E: drive. In Windows create a new partition/drive on the new disk (e.g. F:)
2. Inside Windows copy all files from E: to F: (use "xcopy e:\ f:\ /O /X /E /H /K" to preserve permissions etc).
3. Remove the second disk from the VM
4. In Windows rename drive F: to E:
5. Extend the first disk of the VM to the size that you require. In Windows Disk Manager expand the C: drive to occupy the whole disk.
- Andreas