When I see someone post about a problem with a piece of hardware and someone else casually tells him to throw it out and get a replacement, I usually react with a frown. After all, the OP invested an appreciable amount of money in the hardware and telling him to junk it seems callous.
BUT in the case of Samsung CD drives, it's really the only sensible advice. Several years ago, I bought a Samsung CD-ROM drive that developed a tray problem within 3 months, and I've seen numerous others with the same problem. I told myself never again. I even sent a suggestion to Samsung about ways to solve the problem.
CD writers are relatively cheap now compared to what they cost a few years ago. If you can afford it, treat yourself to a Liteon or Sony writer.
As a stop-gap solution, if you have some mechanical skill, remove the small rubber belt that pulls the tray in and out. Go to an electronics parts shop and buy a belt that's slightly smaller. It will cost only a buck or two. That will probably cure the problem temporarily, but only for several months at the most.