the text, you read this about ranching after the Civil War:

Ranchers employed cowhands to tend their cattle and drive herds to market. These hard workers rode alongside the huge herds in good and bad weather. They kept the cattle moving and rounded up strays. After the Civil War, veterans of the Confederate Army made up the majority of the cowhands who worked in Texas. However, it is estimated that nearly one in three cowhands was either Mexican American or African American. Some cowhands dreamed of setting aside enough money to start a herd of their own.
Why might recent events have led to many African Americans working for ranchers?
*
During the Civil War, many African Americans went west to work on railroads
After the end of slavery, African Americans could move and find new work
In the 1850s, many free African Americans from the north became ranchers.

After the end of slavery and the Civil War, African Americans were no longer bound to plantation labor and were able to seek new employment opportunities. Many African Americans, seeking economic independence and a chance to escape the discrimination and limited opportunities in the South, moved westward in search of work. Ranching provided a promising opportunity for African Americans to work as cowhands and potentially even start their own herds. Therefore, recent events like the end of slavery and the desire for economic advancement likely led to many African Americans working for ranchers after the Civil War.