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.
Does offering Udhiyah (Offering a Sacrificial animal at Aid Al-Adha) avails from offering Aqiqa?
Offering an Udhiyah doesn't avail a person from offering Aqiqa because each of which is a different act of worship. And Allah Knows Best.
What should one who forgot to offer the second Sajda during congregational prayer, and remembered it before the end of the prayer do?
All perfect praise be to Allah, The Lord of The Worlds. Whoever forgets a pillar of prayer while in congregation must follow the lead of the Imam, and after the latter offers Tasleem, he should offer one Rakah, then perform Sujood As-Sahw (prostration of forgetfulness). And Allah Knows Best.
What is the ruling on wiping the head during ablution from behind a barrier like a headscarf (hijab)?
The obligation in ablution is to wipe some of the head; it is not a condition to wipe all of it. As for one who has a turban or headscarf on their head, it is permissible for them to wipe over it after wiping a part of their head in any place. This is easily done at the front of the head. This means the woman begins by wiping the front of her head from under the headscarf, then completes the wiping to the back of the head from over the headscarf. If the woman wipes over the headscarf on her head and the moisture reaches the scalp or some hair within the boundaries of the head, it suffices for wiping the head. And Allah the Almighty knows best.