Genesis 37:18-29

18They saw him from afar, and before he came near to them athey conspired against him to kill him. 19They said to one another, “Here comes this dreamer. 20Come now, blet us kill him and throw him into one of the pits.
Or cisterns; also verses 22, 24
Then we will say that a fierce animal has devoured him, and we will see what will become of his dreams.”
21But when dReuben heard it, he rescued him out of their hands, saying, “Let us not take his life.” 22And Reuben said to them, “Shed no blood; throw him into this pit here in the wilderness, but do not lay a hand on him”— ethat he might rescue him out of their hand to restore him to his father. 23So when Joseph came to his brothers, they stripped him of his robe, fthe robe of many colors that he wore. 24And they took him and gthrew him into a pit. The pit was empty; there was no water in it.

25Then they sat down to eat. And looking up they saw a hcaravan of iIshmaelites coming from Gilead, with their camels bearing jgum, balm, and myrrh, on their way to carry it down to Egypt. 26Then Judah said to his brothers, “What profit is it kif we kill our brother and conceal his blood? 27Come, let us sell him to the Ishmaelites, and llet not our hand be upon him, for he is our brother, our own flesh.” And his brothers listened to him. 28Then mMidianite traders passed by. And they drew Joseph up and lifted him out of the pit, and nsold him to the Ishmaelites for twenty shekels
A  shekel was about 2/5 ounce or 11 grams
of silver. They took Joseph to Egypt.

29When Reuben returned to the pit and saw that Joseph was not in the pit, he ptore his clothes

Genesis 45:4

4So Joseph said to his brothers, “Come near to me, please.” And they came near. And he said, “I am your brother, Joseph, qwhom you sold into Egypt.

Genesis 50:15-20

God’s Good Purposes

15When Joseph’s brothers saw that their father was dead, they said, “It may be that Joseph will hate us and pay us back for all the evil that we did to him.” 16So they sent a message to Joseph, saying, “Your father gave this command before he died: 17Say to Joseph, “Please forgive the transgression of your brothers and their sin, because they did evil to you.”’ And now, please forgive the transgression of the servants of rthe God of your father.” Joseph wept when they spoke to him. 18His brothers also came and sfell down before him and said, “Behold, we are your servants.” 19But Joseph said to them, “Do not fear, for tam I in the place of God? 20As for you, you meant evil against me, but uGod meant it for good, to bring it about that many people
Or a numerous people
should be kept alive, as they are today.

Psalms 105:17

17he had wsent a man ahead of them,
Joseph, who was xsold as a slave.
Copyright information for ESV