Triangular Arbitrage Practice example

Hi
I am really struggling to understand this memo:

Context:
CAD/USD = 1.2138/1.2259
BRL/USD = 2.3844/2.4082
CAD/BRL (cross rate) = 0.5040/0/5141

Question:
If a dealer’s bid-side quote for the CAD/BRL is C$0.5250, Tremblay’s profit on a US$1,000,000 initial investment in the triangular arbitrage opportunity is closest to:

Memo:
Correct. It is cheaper to buy Canadian dollars indirectly through Brazilian reals than directly with US dollars. This creates a triangular arbitrage opportunity:

US$1,000,000 × 2.3844 = BRL2,384,400

2,384,400 × 0.5250 = C$1,251,810

C$1,251,810/1.2259 = US$1,021,135

US$1,021,135 – US$1,000,000 = US$21,135 profit

So, I did everything correctly except for when I was converting CAD back to USD, I converted my CAD back to USD using the bid rate and the memo used the offer rate. I’ve been trying to understand this all day and I don’t understand the logic.

The way that I am currently thinking is that we buy at the offer and sell to the bid. But if I have CAD and need USD how am I supposed to think? You can buy USD with CAD (therefore use offer) or you can sell CAD for USD (use bid)

I noticed that when we initially converted our $1m into BRL we used the bid rate ( so we are effectively selling our USD to the bid rate?)

Any help would be greatly appreciated!

The quote is CAD/USD. You’re buying USD, so you use the offer (ask) rate: the rate at which they offer USD for sale.

Think of the base currency in the quote as a commodity (I always think of oil). You’re either buying the base currency, or else you’re selling the base currency. Here, you’re buying the base currency: you’re buying USD.