Rabbi Chayim Palachi (Rabbi of Izmir, Turkey, 19th century) raises the question concerning one who ate and must recite a Borei Nefashot, but before reciting the Beracha uses the bathroom. So after he uses the bathroom, he has two blessings he must recite: Borei Nefashot for the food he had just eaten, and Asher Yatzar which is the Beracha one recites after performing his bodily functions. Which Beracha does he recite first?
The majority of the Poskim (authorities on Halacha) rule that Asher Yatzar takes precedence.
One rationale given for this ruling is the principle in Halacha known as "Tadir Ve’she’eno Tadir, Tadir Kodem" – meaning, precedence is always given to the more frequent Mitzva. Some Poskim apply this rule in our case, and therefore maintain that one recites Asher Yatzar before Borei Nefashot. But not everyone agrees with that logic. The reasoning above assumes that Asher Yatzar occurs more frequently than Borei Nefashot. Many other Poskim however, question this assumption, noting that it is very possible for a person to drink more frequently than he uses the bathroom, in which case he is obligated to recite Borei Nefashot more frequently than he must recite Asher Yatzar.
Rabbi Chayim Palachi provides another explanation for this ruling. He cites that the obligation of Asher Yatzar is the one which is more immediately pressing. The individual has already lost the opportunity to recite Borei Nefashot immediately upon being obligated in this Beracha. Asher Yatzar, however, can still be recited at its optimum time which is the moment one exits the bathroom. Therefore, he says one should seize this opportunity and recite Asher Yatzar first.
Thus, a person who must use the bathroom before reciting Borei Nefashot should, after leaving the bathroom, first recite Asher Yatzar, followed by Borei Nefashot.