Does passing wind from the anus affect ritual purity?
Ablution is nullified by the passing of wind from the anus, but washing the anus is not required as wind leaves no impurity.
Is touching a non-Mahram woman invalidates person's ablution?
Touching non-Mahram woman is prohibited, and according to the Shafiee's, it invalidates the ablution. And Allah Knows Best.
Should nail polish be removed before making ablution?
Yes, it should be removed because it prevents water from reaching the nails.
Is wearing a cap permissible for boys, or girls?
All Perfect Praise is due to Allah, The Lord of The Worlds.
In principle, anything is permissible sol long as there is no Sharia evidence prohibiting it, thus wearing the cap by boys is permissible as long as it isn`t done in imitation of the disbelievers. Moreover, a Muslim woman should avoid all that which attracts the attention of men because whatever leads to the forbidden is forbidden. And Allah Knows Best.