After 2h, the Bus drops you off on the PanAmericana. Cross the 'street' as you need to get the bus in the other direction.
Here you can take any bus going towards Rivas (Just make sure it does not pass Nicoya). You can either get another bus to Penas Blancas and from there one to Rivas or get into a Tica or Transnica bus which will bring you directly to Rivas. If you want to save some time and have some money to spend might be better to get one of these buses. We took the Transnica (as it came first) it was 20$ per person. This option also saves you some time at the boarder as they arrange everything for you.