In مَنْ صَلَّى يُرَائِي, مَنْ introduces the condition, صَلَّى is a past-tense verb, and يُرَائِي describes the accompanying state: praying while showing off. The same structure is repeated for fasting and charity, with فَقَدْ emphatically introducing the response.
The repetition shows that intention matters across different acts of worship. Sincerity is not confined to one ritual; it also matters in financial help and religious service. Reviewing one's motive and resisting the hunger for praise are practical ways to protect the quality of good deeds.