If someone bought a car from an interest-based bank and then sold it to another person, does the second person bear any sin if they use the car's price to pay the installments owed to the bank?
When the buyer purchased the car, it became their property, and the price became their responsibility. The bank acts as the seller's agent for receiving the payment. Therefore, there is no sin on the second buyer, God willing, as long as the bank does not impose an increase in the amount if a payment is delayed. And Allah The Almighty Knows Best.
Does wiping over one's socks during ablution permissible?
If the socks were thick, then wiping over them during ablution is permissible so long as wiping conditions are observed. 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.
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.