الْمَرْءُ means “person” and is the subject of لَا يُبَالِي. أَخَذَ is a past-tense verb: “he took.” مِنْهُ contains the preposition مِنْ, which may indicate a source.
In أَمِنَ الْحَلَالِ أَمْ مِنَ الْحَرَامِ, the initial interrogative أَ introduces a question, and أَمْ offers the two alternatives: “from the lawful or from the unlawful?”
The paired expression teaches that the means of earning matter, not simply the amount earned.