Today's Gospel passage narrates two different episodes in Jesus' life, namely Jesus' second prophecy of his Passion, and then the strange story of the coin in the fish's mouth to pay for the Temple tax.
Let us consider the, more difficult second episode. In general there are two approaches to dealing with Jesus miracles. The first approach is quite simply to accept the miracle stories as they stand and affirm that Jesus could work miracles of any kind. The second approach is to try to "explain" the miracle story, but this usually runs the risk that we explain the miracle away; that is we explain it in such a rational way that there is no longer any miracle involved.
Taking the second approach, some people will say that Jesus told Peter to go catch a fish and sell it to get money for the tax.
Taking the first approach, that it was a real miracle, leads to a serious theological problem. Did Jesus in his human nature possess divine knowledge? If so, the story may run the risk of trivializing Jesus' miraculous power.
Matthew's point, however, may simply be that the Temple era— the old— is over and hence Jesus and his disciples belong to a new world, the world of the Kingdom of God.
Lord we rejoice that we are children of Your Kingdom.