If your baby goat is nursing from it's mother you can take the baby goat away from it's mother after 8 weeks since baby goats need to nurse from their mother for up to 8 weeks.
If you're bottle feeding the baby goat then you will need to bottle feed the goat for up to 8 weeks as well before you can sell or give away the goat and separate the goat from it's mother.