The USA, however, isn't exactly "declining". As the article I linked to above noted, the USA is continuing to grow across a broad spectrum of measures. Yes, China and the EU may be growing at a faster rate in some of those categories, but the USA has such a great initial advantage that it will be a long, long time until another country catches or surpases the USA in even one of those categories.
So, let us take your simplified example and expand it a little to see a broader macroeconomic picture that illustrates why Brazil and China would want to do that trade in dollars. Let's say that Brazil wants to use the cash from that commodity sale to improve the living conditions of their citizens and purchase some Catepillar brand forest-clearing bulldozers and some crude oil to refine into gasoline for those bulldozers because their local sugar-cane ethanol would wear-out the engines too quickly. Well, Catepillar is a American company so it makes sense for them to bill Brazil in USD instead RMB. The middle east oil exporter also charges Brazil in USD because the US Navy protects their shipping lanes and the CIA and State Dept maintains (or doesn't) the internal stability of that country. Last, China has USD coming out of its ears and is more than happy to trade pieces of paper for real assets like Brazillian ore.
Now, why would the Chinese want Brazil to pay them in USD for some Chinese goods? The Chinese are smart and recognize that if the USD sank too far in value that the manufacturing jobs in China would return to the USA. This is a problem for the Communists because they do not have a sufficient internal economy to continue employing hundreds of millions of peasants. And, that would be a dangerous political problem for the Communist leadership in China.
Now, I will agree that this assumes linear development, but it would take a situation like WWII to knock the USA out of reserve currency status, and I don't think that is very likely.
In conclusion, welcome to Pax Americana; you should learn to love it.