Is prayer nullified by having thoughts while performing it?
Prayer isn`t nullified by having thoughts while performing it, provided that the praying person offers all of its pillars and meets all of its conditions. However, the reward decreases significantly in the absence of reverence since a praying person is rewarded according to the attentiveness of his/her heart during prayer.
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.
Does Husband fasting while being impure for having sexual intercourse with his wife at night permissible?
Yes it is permissible for you to fast because impurity isn't among valid fasting conditions, but you are obliged to perform ritual impurity in order to catch up Fajr prayer at its due time. And Allah Knows Best.
I have mixed (halal and haram) money, and I want to purify it. My father is poor, and I want him, my mother, and my mother-in-law to perform Hajj, along with myself and my wife, as they need care due to their old age. Is it permissible to use this money for Hajj, or what should I do with it? Please advise.
If you knew the exact amount of unlawful money, then you should give as a charity, and if didn't then try to figure out the closest amount in order to give it as a charity.
As for performing Hajj, perform it by using your lawful money. May Allah Bless you for being dutiful to your parents and your mother in law and for your attempt to serve them, And Allah Knows Best.