First of all, God knows the words we are going to speak before we speak them because He knows our hearts and minds. Jesus knew what was in their hearts even before they spoke at all. That part of the verse does not mean that God foreknows from eternity all of the future as an absolute certainty.
Second of all, all the days ordained does not mean what occurs within those days but the number of those days. And the fact remains, God can shorten the days of the wicked as proverbs says and God can also add days to your life like He did with Hezekieh. So the future is open as God is able to change it by adding or subtracting the days of your life.