Attention to your overall earnings rather than the details of each transaction is the key to solving this riddle. We can figure this out by deducting the whole amount you paid for the cow from the total amount you made when you sold it.

$1900 (first purchase of $800 + second purchase of $1100) is the total amount spent on the cow.

Profit from selling the cow: $1000 from the first sale + $1300 from the second sale = $2300.

To get your profit, now deduct all of your expenses from all of your earnings:

$2300 (earned) – $1900 (spent) = $400 is the profit.

As a result, your total profit was $400.

$1900 (first purchase of $800 + second purchase of $1100) is the total amount spent on the cow.

Profit from selling the cow: $1000 from the first sale + $1300 from the second sale = $2300.

To get your profit, now deduct all of your expenses from all of your earnings:

$2300 (earned) – $1900 (spent) = $400 is the profit.

As a result, your total profit was $400.