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.
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.
I made a vow "If the Israeli troops retreated out of Gaza strip I will buy a cake from a certain bakery" and it happened. Am I obliged to buy from the same bakery?
You are obliged to buy from the same bakery. And Allah Knows Best.
What should a woman, who has given several births during different months of Ramadhaan, and didn`t make up for them in addition to forgetting the exact number of the days and years in which she had missed fasting, do?
She should make up the missed days of Ramadan after estimating their number, and paying the ransom (in food) due on each missed day that she had delayed making up. In addition, she is obliged to repay the ransom according to the number of years if she was able to fast before that time, but didn`t.