Hearing Shofar or Davening Musaf

One who does not know to pray on his own and is in a situation where he can either go to one community for Rosh Hashanah and hear the Shofar but will not be able to pray, or another community in which he will be able to pray but there is doubt if he will hear the Shofar, then he should go to the community in which he will hear the Shofar, as Shofar is a Biblical command, while Musaf is only a Rabbinical command.