the one who opened the pit must pay the owner for the loss and take the dead animal in exchange.
OJBThe ba'al habor shall make restitution, and give kesef unto their ba'alim; and the carcass shall be his.
Onkelos (Etheridge)The master of the pit shall pay: he shall give silver to his owner, and the carcass shall be his own.
T4TThen the owner of the pit/cistern must pay for the animal that died. He must give the money to the animal’s owner, but then he can take away the animal that died and do whatever he wants to with it.