historycultureeducation:

Union General George A. Custer (right) sits alongside his friend, Confederate prisoner Lieutenant James B. Washington (left). They were classmates at West Point before the Civil War broke out — 1862

Source: https://reddit.com/r/ColorizedHistory/comments/hbz5un/union_general_george_a_custer_right_sits/

Brevet General of Volunteers.
His army rank at the end of the conflict was Captain.