After a Rule 5 player is drafted, you have until the end of Spring Training to put him on your ML roster. If you don’t put him on your ML roster by that time, he will automatically be offered back.
After a Rule 5 player is traded or claimed off of waivers, you have 3 days to put him on your ML roster or else he will automatically be offered back.