Not hard, I don't think. These are all secondary sources citing other, presumably more reliable secondary sources. It's clear there is some doubt or room for argument, but reading all together it seems there was formerly some confusion that made the 4th Earl a cousin rather than brother of the 3rd Earl.
Both Complete Peerage and Scots Peerage are competent compilations, but both are known to have many problems. Despite these problems, I think CP has it right, and SP supports rather than contradicts CP.
All the other sources cited here seem to draw ultimately on either CP or SP.
Genealogics says the 4th Earl was a son of the 2nd Earl (brother of the 3rd Earl, not cousin). Genealogics is a compilation by Leo van de Pas, an excellent researcher. However, his cited sources are conspicuously missing SP. Also, he is active at SGM and often draws on the discussions there to improve his data. No evidence he has done that here. Instead, he is citing only the cursory stuff.
ThePeerage.com also says the 4th Earl was a son of the 2nd Earl. This site is another good compilation, by a team working primarily from secondary sources. It is known to have many, many problems. Notice that it cites Alison Weir, a good but not deep researcher. IMO, citing ThePeerage.com is about as authoritative as citing Geni.com.
DunbarDNA.org says the 4th Earl was a cousin of the 2nd Earl. This site is simply a compilation by someone. We don't know who. Comparing to Scots Peerage, we see that the 4th Earl "is always stated to be the son of Alexander Dunbar and Matilda Fraser, the heiress of James Fraser of Frendraught, though no charter evidence is adduced, not even by Macfarlane." So no surprise if an anonymous compilation follows the "party line". This is a DNA site, so their primary interest is likely to be identifying men in the Dunbar male lineage, not in sorting out disputed 15th century lines.
Caledoniansocietyofneworleans.com says the 2nd and 4th Earls were brothers (not father and son). This is another anonymous compilation. I see no evidence here that this is anything more than a quick narrative overview. No research, no citations except to "antiquarian books published in the 1800's." Notice that this material was cribbed from ElectricScotland.com, a site that has a lot of general un-sourced info drawn from many published clan and tartan books.
BTW, I have a shelf full of these clan and tartan books. They rarely deal with genealogical detail. The idea is rather to give a brief and exciting history of the various clans. One of these, Frank Adam's _Clans, Septs and Regiments of the Scottish Highlands_ does actually go into detail once in a while. It says the 4th Earl was son of the 2nd Earl.
Finally, the Rootsweb.com site is an amateur compilation, valuable here only because it quotes the CP and SP entries.
So, except for CP and SP, these secondary sources are all just static. None of them add anything.
Alex Maxwell Findlater's post at SGM is different. He is a highly competent researcher specializing in exactly this area. He has actually looked deeper, and is able to discuss the underlying documentation and relationships.
SP says, "James, fourth Earl of Moray, who is always stated to be the son of Alexander Dunbar and Matilda Fraser, the heiress of James Fraser of Frendraught, though no charter evidence is adduced, not even by Macfarlane. When he succeeded his father or grandfather is not certain ..." So, we clearly see the doubt. SP isn't actually rejecting the idea that the 4th Earl was a cousin of the 3rd Earl, but it suggests they might have been brothers.
Findlater takes this and expands. He offers a plausible explanation for the confusion: "There was indeed an Alexander Dunbar who was a second son and the father of a Dunbar Earl, but he was in a much earlier generation."
And, he offers a plausible scenario for the 1432 re-grant: "The naming of Thomas [3rd] Earl of Moray as heir in the 1432 regrant seems likely because James [his younger brother, later 4th Earl] had only daughters and they wanted to keep the lands in the Dunbar family, so effectively an enforcement of a tailzie to heirs male. After all, if this scenario is correct, Earl Thomas [3rd Earl] would have been a party to his mother’s [the heiress of Frenraught's] demise to his younger brother [the 4th Earl]."
Bottom line: everything so far shows that the 3rd and 4th Earls were brothers, sons of the 2nd Earl. In my opinion, Findlater is almost certainly correct when he says the confusion that made the 4th Earl a cousin of the 3rd Earl almost certainly results from an "over-reading" of another relationship.