What is the ruling on staring at the Holy Ka'abah?
All perfecy 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.
Staring/looking at the Holy Ka'abah is an act of worship even if this took place while performing a prayer, since Al-Baihaqee stated that the Prophet (PBUH) said: " Staring at the Holy Ka'abah is an act of devotion." [Sho'aab Al-Imaan]. And Allah Knows Best.
Is it permissible to offer prayer at home, or should it be offered in the mosque?
All perfect praise be to Allah, The Lord of The Worlds. It isn`t preferable for the man to pray at home as praying in the mosque is twenty seven times more rewarding. Therefore, this should motivate him to offer prayers in the mosque. 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.
What is the ruling on someone who vowed to fast for two consecutive months, but failed to do so?
He is obliged to fulfill his vow by fasting for two consecutive months, but if he fails to do so then, it remains a debt on him until he either fulfills his vow, or dies. In case of his death, his guardian is supposed to fast on his behalf, or donate food from his estate in return for fasting, but if the guardian fails to do so then, it is all in the Hands of Allah.