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.
What is the ruling on memorizing the Quran during menstruation, knowing that I do not read directly from the Quran but from a paper or from my phone?
It is not permissible to memorize the Quran during menstruation because memorization requires repetition, and a menstruating woman cannot touch the physical pages of the Quran. Similarly, if the Quranic verses appear on the screen of the phone, it is considered like touching the Quran. And Allah Knows Best.
What is the ruling on having a second congregational prayer in the mosque?
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 It is disliked to have a second congregational prayer in the mosque which isn`t visited by travelers like the neighborhood`s mosque, and which has an appointed Imam, save with the latter`s permission. Nevertheless, if the mosque is visited by travelers, it is permissible to have a second and a third congregational prayer, whether it has an appointed Imam or not, or whether he permits that or not. And Allah Knows Best.
Is it permissible for a Muslim woman to wear trousers at home?
Wearing trousers at home isn't prohibited so long as non-Mahrams do not see her. And Allah Knows Best.