Give charity because someone needs help not to show off.
Remember that your prayers are directed to God, not to impress somebody.
Fast in secret rather than in public.
Notice that Jesus assumes that they are going to contribute to charitable causes, to pray often, and to fast.
What Jesus is cautioning them about is confusion of goals. You're doing the things that you ought to be doing, and remember why you are doing them. You will be rewarded, but not necessarily in an immediate, public way.
Lectio Divina:Psalm 51:15-17
O Lord, open my lips, and my mouth will declare your praise.
For you have no delight in sacrifice;
if I were to give a burnt offering, you would not be pleased.
The sacrifice acceptable to God is a broken spirit;
a broken and contrite heart, O God, you will not despise.