First, you should adjust the size of the .vdi file, so it can handle the changes to the partition sizes. See VBoxManage.
Specifically, of interest is this option:
VBoxManage modifyhd <uuid>|<filename>
[--type normal|writethrough|immutable|shareable|
readonly|multiattach]
[--autoreset on|off]
[--compact]
[--resize <megabytes>|--resizebyte <bytes>]
Once you have the .vdi resized, you can modify the partitions as you would a physical system, from within the guest (many options available, both here on the forum, and on the wider Internet).
Google can help, or ask for more help, if needed.