Taking Country B as a comparison to the United States,
Country B -
1 barrel of oil = 7 hrs
1 ton of coal = 3 hrs
U.S. -
1 barrel of oil = 4 hrs
1 ton of coal = 5 hrs
Country B has the comparative advantage in coal production over US because it takes less time to produce 1 ton of coal. The opposite is true for oil production as US takes less time for 1 barrel of oil.
Availability and use of a natural resource give a country an advantage over another that does not. It takes less time with easily accessible national resource to produce something; such as oil and coal.
A comparative advantage means that someone can produce something at a lower prize than everyone else. So, here United States can produce the first item on the list ( I assume that it's one barrel of crude oil) cheaper than the other two countries. This could be for example because the oil is available in the US and does not need to be imported - saving money and workers' time