Q: Some boys and girl from went gambling. One boy won 85 000. He agreed to give it to another boy. So it went like this. X won 85 000. He gave it to Y on condition that Y would become the owner of it and thereafter give it back to X so it would not be casino money. X also said he would give 15 000 to a local musjid. IS this allowed?
A: The entire wealth distribution as attempted by X and Y and wanting to give it to a musjid is haraam. This haraam money must be given to the poor without any intention of reward or personal benefit.
Allah certainly Knows Best.