I'm not entirely convinced that's an authentic hanging/lynching.
There was unfortunately a dark time in America's history when hanging and lynching pictures were big business, including "hanging postcards" too, which were sold in the thousands. Often these pictures were of people who had been hanged but with the scene recreated after the event for a better picture. That looks to be the case here, with the over-dramatic observers and the guy pointing. It was also not unusual for the poor victim to be 'transferred' to a telegraph pole alongside a railroad (for maximum public exposure), having been hung somewhere else. That looks like a telegraph pole, and there's a "Railroad Crossing" sign to the extreme left.
However, here, I suspect the whole thing may have been artificially staged for the purposes of generating a 'saleable' picture. The 'victim' appears to be in an unnatural posture for someone who has been hung. Usually the toes of hanging victims point downwards as least a little, which is not the case here. The neck here is unusually 'bunched up' rather than stretched by the bodyweight pulling down on it. The arms also don't look as if they're limp. I could be wrong, and maybe this poor guy was hung a couple of hours earlier and has gone into rigor mortis (no sign of it around his mouth though), but that's my take.
Are those US Cavalry uniforms? That's what they look like to me.