Then Daniel went in, and desired of the king that he would give him time, and that he would shew the king the interpretation. Then Daniel went to his house, and made the thing known to Hananiah, Mishael, and Azariah, his companions: That they would desire mercies of the God of heaven concerning this secret; that Daniel and his fellows should not perish with the rest of the wise men of Babylon. Then was the secret revealed unto Daniel in a night vision. Then Daniel blessed the God of heaven. Daniel answered and said, Blessed be the name of God for ever and ever: for wisdom and might are his: And he changeth the times and the seasons: he removeth kings, and setteth up kings: he giveth wisdom unto the wise, and knowledge to them that know understanding: He revealeth the deep and secret things: he knoweth what is in the darkness, and the light dwelleth with him. I thank thee, and praise thee, O thou God of my fathers, who hast given me wisdom and might, and hast made known unto me now what we desired of thee: for thou hast now made known unto us the king's matter.
Daniel was in a situation where his life depnded on whether he knew the answers to the king's questions. He did the wise thing by asking for time and by asking his friends to join him in prayer. Proverbs 24:6b says, "and in multitude of counsellors there is safety." Proverbs also says that wisdom comes from God. Daniel was searching that wisdom by praying and asking God to bestow it upon him.
Wouldn't we be wise to do the same?