When should Netilas Yadaim/Asher Yatzar be said in the morning: When you come out of the bathroom, or when you get to shul? [The distance to the home and shul is less then 5 minutes]?
The blessing of al netilas yadayim is a blessing over the act of washing the hands, and it should therefore be made immediately after washing, before the hands are fully dried. The option of waiting until reaching shul is also mentioned by authorities, but it is preferable to recite the blessing straight away.
Sources: See Shulchan Aruch, Orach Chaim 6:2; Mishnah Berurah 6:9; see also Yalkut Yosef, vol. 1, p. 342.