Virtualbox has multiple networking mode that you can choose for guest VMs. You did not specify what mode you chose, but if you chose 'NAT', (it's the default and most popular), you cannot ssh from the guest to the host. Because there is no route from the guest to the host.
Additionally, your guest OS does not know it is a VM. When you
guestuser@guest$ ssh -p 2222 hostuser@localhost you are saying: ssh into localhost, the guest OS, port 2222, and connect to the sshd service running on the guest OS.
If you wish to have the guest OS be able to connect to the host OS you should change the VB networking mode. You will probably want 'Bridged' mode. Here the VM acts as a separate (physical) computer on your home network. It will receive a IP address via DHCP. Then you may ssh from one into the other, assuming there is no firewall rules or other 'barriers' between them. There is no port forwarding in this mode; all ssh connections will be through port 22 by default.
hostuser@host$ ssh firstname.lastname@example.org
guestuse@guest$ ssh email@example.com
Assuming host IP=192.168.0.1 and guest IP=192.168.0.2
Opinion: Unless you are setting up a specific service on your guest, there is often little need for the guest OS to be able to connect its host in the way you are asking about. I would not go through the trouble of setting this up.