Let's represent the unknown amount of cargo loaded in the afternoon as "x" tons.
The equation representing the total weight of cargos loaded on the day can be written as:
7,580 + x = 12,997
To solve for "x," we can isolate it by subtracting 7,580 from both sides of the equation:
x = 12,997 - 7,580
Simplifying the right side:
x = 5,417
Therefore, the amount of cargo loaded in the afternoon was 5,417 tons.