You can either go with a swap file, like the answer to the question you link to, or you can add a swap partition.
Using a swap file:
Command borrowed from #Qasim in Does it make sense to create swap partitions for new installations nowadways?
First switch to the root user
Then run the following command
mkdir /swap && cd /swap && fallocate -l 2g 2GB.swap && mkswap 2GB.swap && swapon 2GB.swap && echo "# # # Swap File # # #" >> /etc/fstab && echo "/swap/2GB.swap none swap sw 0 0" >> /etc/fstab && mount -a
This will first create a folder called /swap, then enter the folder and add a 2 GB swap file. Then it will activate the swap file, and at last, it adds an entry to /etc/fstab that ensures this happens every time.
Using a swap partition:
Seeing as you are using an MS-DOS partition table, you can not have more primary partitions. In order to make a swap partition, you will have to 'temporarily' delete one of your partitions.
So first back up your data from that partition, then in gparted, delete the partion.
Right click on the now unallocated space and create a new partion, make sure to choose 'Logical' partition.
This logical partition can contain a lot of primary partitions, so now you can create a partition similar to the one you deleted, and add the swap partition next to it.
Once the swap partition is created, you can activate it with
sudo swapon /dev/sda5 (replacing /dev/sda5 with the actual name of the partition).
To ensure that it is activated every time you boot, you'll have to edit /etc/fstab
sudo nano /etc/fstab
Add a new line with the following text, replacing /dev/sda5 with the name of your device:
/dev/sda5 none swap sw 0 0
Save with CTRL+O, then close with CTRL+X