Two full days to make the move from Ushguli to Batumi is plenty, as you should be able to do it all in one day. Your cheapest option for four people is to use a bus. Keep in mind that you will need a taxi driver to take you from Ushguli back to Mestia, in order to catch a bus as there is no public transport within Svaneti (no buses from Ushguli to Mestia).
Looks like you want to use the Azerbaijan one. To find this, I went to Rome2Rio's page on Tbilisi to Baku. This then shows the train option with Azerbaijan Railways (ADDY)
$6 - $20 USD
And links to the rail website showing movement of the trains.
However it notes that "Buy tickets at ...