"From whom do the kings of the earth collect duty and taxes ..." (Matthew 17:25-26)

After Jesus and his disciples arrived in Capernaum, the collectors of the two-drachma temple tax came to Peter and asked, "Doesn't your teacher pay the temple tax?" "Yes, he does," he replied. When Peter came into the house, Jesus was the first to speak. "What do you think, Simon?" he asked. "From whom do the kings of the earth collect duty and taxes — from their own children or from others?" (Matthew 17:24-26)

What does Jesus' analogy of taxes and the king's son mean?

Jesus is utilizing the situation as a teaching moment. Jesus is illustrating the intimate relationship between God and His loving servants - and comparing this relationship with the relationship of a son and father who also a king.

So the point Jesus is making to Peter is that if a person is subservient to God, then he comes under God's protection, and is not necessarily obligated to the general obligations of the physical world.

While this event relates to a temple tax, Jesus' lesson relates directly to one of the mainstays of the physical world: The law of consequences.

What is the law of consequences?

We can see this effect immediately if we hurt someone: We will likely be hurt back by them or by an authority. This is part of the law of cause of effect in the physical world.

This means that all of our activities that are performed with self-centered motive (inclusive of those extensions of ourselves - our families, countries, organizations, etc.) generate an account of sorts, which we will have to pay back (good or bad), either in this lifetime or the next.

The result is that we are given the opportunity to experience whatever effects we have had upon others - good and bad. These will occur for us in our current lifetime or a future lifetime.

This is why some of us are born into relative conditions of suffering. Some may be born into situations that relate directly to activities from the prior lifetime. These may be related to the consequences of our activities during our prior physical lifetime.

This has also been described as "as you sow, so shall you reap." This concept has been confirmed in numerous scriptural verses throughout the Bible, both directly and indirectly (KJV):
Sow your seed in the morning and do not be idle in the evening, for you do not know whether morning or evening sowing will succeed, or whether both of them alike will be good. (Ecclesiastes 11:6)

Those who sow in tears shall reap with joyful shouting. (Psalm 126:5)

Sow with a view to righteousness, Reap in accordance with kindness (Hosea 10:12)

“Then this shall be the sign for you: you will eat this year what grows of itself, in the second year what springs from the same, and in the third year sow, reap, plant vineyards and eat their fruit. (Isaiah 37:30)

For they sow the wind
And they reap the whirlwind. (Hosea 8:7)

You shall have the fiftieth year as a jubilee; you shall not sow, nor reap its aftergrowth, nor gather in from its untrimmed vines. (Leviticus 25:11)

When you are sowing the eighth year, you can still eat old things from the crop, eating the old until the ninth year when its crop comes in. (Leviticus 25:22)

“According to what I have seen, those who plow iniquity
And those who sow trouble harvest it. (Job 4:8)

“You will sow but you will not reap. (Micah 6:15)

He who sows iniquity will reap vanity (Proverbs 22:8)

The wicked earns deceptive wages, but he who sows righteousness gets a true reward. (Proverbs 11:18)

He who watches the wind will not sow and he who looks at the clouds will not reap. (Ecclesiastes 11:4)
We know from Jesus' various teachings that he also taught this principle:
I sent you to reap that for which you have not labored; others have labored and you have entered into their labor.” (John 4:38)

For in this case the saying is true, ‘One sows and another reaps.’ (John 4:37)

“And the one also who had received the one talent came up and said, ‘Master, I knew you to be a hard man, reaping where you did not sow and gathering where you scattered no seed. (Matthew 25:24)

"Consider the ravens, for they neither sow nor reap; they have no storeroom nor barn, and yet God feeds them; how much more valuable you are than the birds!" (Luke 12:24)

"... you take up what you did not lay down and reap what you did not sow.’ (Luke 19:21)

He said to him, ‘By your own words I will judge you, you worthless slave. Did you know that I am an exacting man, taking up what I did not lay down and reaping what I did not sow? (Luke 19:22)

For the Son of Man is going to come in his Father's glory with his angels, and then he will reward each person according to what they have done. (Matthew 16:27

And the seed whose fruit is righteousness is sown in peace by those who make peace. (James 3:18)
Even Paul - who was not a disciple of Jesus - also wrote about the law of consequences:
Do not be deceived, God is not mocked; for whatever a man sows, this he will also reap. (Galatians 6:7)

For the one who sows to his own flesh will from the flesh reap corruption, but the one who sows to the Spirit will from the Spirit reap eternal life. (Galatians 6:8)

Now this I say, he who sows sparingly will also reap sparingly, and he who sows bountifully will also reap bountiful. (2 Corinthians 9:6)

What about consequences in the service to God?

Jesus is speaking specifically to this.

If we were to act in a God-centered way: Acting to please God rather than for ourselves, then we are generally released from the results of those activities. Working for God's behalf will not create effects that will have to be paid off. Serving God produces spiritual results, and over time, will also mitigate other consequences built up over our lifetimes. This is summed up nicely in Proverbs:
The wicked earns deceptive wages, but he who sows righteousness gets a true reward. (Proverbs 11:18)
Jesus also spoke about this:
But when you fast, put oil on your head and wash your face,  so that it will not be obvious to others that you are fasting, but only to your Father, who is unseen; and your Father, who sees what is done in secret, will reward you. (Matthew 6:18) 
This works in much the same way that Jesus illustrates, with a king's son being exempt from taxes. The household of the king is exempt because the king is the ruler of the land. In the same way, God's loving servants are exempt because the Supreme Being is the Ruler and Creator of the physical world.

This doesn't necessarily mean that someone working to serve God won't also suffer the consequences of other outside activities. But such consequences help such a person continue to advance towards perfecting their relationship with God.

Working to please the Supreme Being has spiritual consequences. Working to please God gives us spiritual fulfillment, simply because we are innately loving servants. This is the same reason people feel a little more fulfilled when they work on behalf of a loved one or family members: We are all servants.

Working for the Supreme Being results in the greatest fulfillment of our spiritual self.

Working to please the Supreme Being also helps others. Why? Because the Supreme Being loves each of us, and He is also pleased when we love and help His other children.