As we have seen several times now, the 助動詞（じょどうし） (auxiliary verb) ようだ
is frequently used with verbs, to express that the ‘completion’ of an action is the specific goal/wish of the speaker. It does this implicitly through the meaning of the kanji 様（よう） ‘manner of doing’.
(or 祈（いの）る in its kanji form) is no different, and will imply that the speaker is praying for (A) to be done/completed. This comes from the meaning of the う-Verb
祈（いの）る itself, which can be translated as ‘to pray’, or ‘to beg’. Despite being able to be used when actually praying, this grammar point is used most often to express a ‘hope’.
I hope that it snows tomorrow and school gets canceled.
I hope that the world becomes a peaceful place.
In a similar way to other ように
structures, ないように may also be used with 祈（いの）る, to show that someone is praying for something ‘not’ to happen.
I hope that the teacher doesn't call on me during class.
I hope that I don’t die before I get to ride in my friend’s car.
However, ‘unlike’ other ように
will sometimes be shortened to ように
by itself. This is especially true after ます.
I pray that you can go back to your country this year.
I pray that I can pass tomorrow’s test.
This is the only ように
structure that will have the verb that comes after it omitted. Therefore, ように
(by itself) will always mean ‘to hope for’, and should not be confused with ようにする
, and other similar grammar points.
is also used to express ‘to hope for (A)’, or ‘to wish for (A)’. However, unlike ように祈（いの）る
, the person that the speaker is praying for with といい
will mainly be determined by the use of ね
(praying for someone else), or な (praying for themselves).
I hope that you get into the college that you want to get into. (Hope for your sake)
I hope I can travel abroad next year. (Hope for my own sake)