It says in here that Jesus knew their thoughts before they even said anything out loud. Only God can read minds, and therefore Jesus shows that he is equal to him.
What does Jesus mean by asking: which is easier, to forgive or to heal? The answer is not so simple. For you can give a double answer to that question: on the one hand, pronouncing forgiveness is easier (because everyone can say that!); on the other hand, healing is easier for Jesus, because he must earn the forgiveness of sins by dying on the cross. So for himself, forgiving is harder than healing! Forgiving this man is going to cost him his life!
8 And immediately Jesus, perceiving in his spirit that they thus questioned within themselves, said to them, “Why do you question these things in your hearts?