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.
Should a pregnant woman who broke fast because of pregnancy make it up, and is a ransom due on her?
The pregnant and the suckling, if they fear for their health, may break their fast and make up for it, and no ransom is due on them. However, if they broke fast in fear for the fetus and the baby, then they are obliged to make up for it, and pay the ransom which is feeding a needy person for each of the missed fasting days. And Allah Knows Best.
Is it permissible to offer mandatory prayer while sitting?
All perfect praise be to Allah, The Lord of The Worlds, and may His Peace and Blessings be upon our Prophet Muhammad and upon all of his family and companions. Standing up is a pillar in the mandatory prayer and the prayer is not valid without it unless one cannot do it. As for Nafila (supererogatory prayer), one can perform it in the state of sitting even if he/she can stand, but his/her reward is half the reward of the person who prays while standing if he/sh has no legal excuse for such an act. And Allah Knows Best.
Is it permissible for one to masturbate in order not to commit fornication?
This is called committing the milder of the two evils such as eating a carcass in fear of death, and this happens when committing fornication is very likely to occur.