Subotica is a city in the north of Serbia, located in the province of Vojvodina and close to the border with Hungary.
North towards Hungary
Take bus no. 1a in front of Hungarian consulate (across the cinema, close to the famous bakery "Lipa"). Get off at the last stop, Kelebija. The bus should leave you on the main road, some 1.5 kilometers away from the border. If you're not lucky with the vehicles, you could easily walk to the border. Cross the border on foot, and take a hitch 100m further, at the point where the wider road starts. You won't miss the place, there is a huge sign saying something about vehicles and regulations. This is where the trucks coming from the right lane join the main road. Many trucks go to Budapest or further, so don't accept shorter rides. Mind that hichhiking is forbidden and very complicated on hungarian highways, so try to hitch a ride directly to Budapest. If that doesnt't work, try the road No. 5 (the highway is marked M5), where hichhiking is allowed.
South towards Novi Sad, Belgrade
Take bus no. 6, across the street from Patria Hotel, right before the overpass. This bus is going to Palić lake. Get off at the last stop, in the middle of a small settlement of summer houses, close to the lake. Ask for the road to Novi Sad, local people are willing to help. You'll be on the road in no more than 15 minutes.