HISTORY IS WRITTEN BY THE VICTORS. How Can We Trust What Other People Write When They Are Writing About How Other People Were Thinking? The power to read the thoughts of another is beyond human capability.
The Gospel of Mark, history tells us was written down as dictated to Mark by the Apostle Peter. The Gospel of Matthew was written by the Apostle Matthew so that others would know what happened when he knew Lord Jesus. The Gospel of John is an eyewitness account written with an emphasis on what the Apostle John thought was important. The Gospel of Luke was written so an accurate record of events could be meditated upon by Theophilus.
You quote from the Gospel of Luke and desire to know how is it possible for a person to write down how other people told him what happened. One of the eyewitnesses told Luke what he or she observed when Jesus demonstrated that He had the capacity to read the minds of other people, in this case Pharisees, via the power of the Holy Spirit.
It is worth noting, Lord Jesus Christ has the power to read people’s thoughts today. In fact, the Bible teaches that Lord Jesus searches the hearts of people (Revelation 2:23) to discern the purity of their thoughts and intentions (Hebrews 4:12-13).
Just because somebody writes about what another person did, this does not mean that the person did or does the same thing.