This happens to my system from time to time. You can stick a paper clip in the little hole if you want and pull on it to get the tray out when it sticks again, but I don't like this method. Seems kind of shoddy imo. You can also get a new disc drive belt off ebay since they stiffen with age, but this is kind of complicated and it's probably just easier to get another xbox or use the method that I do on mine. When mine doesn't want to open, I press the eject button and while the eject button is flashing and it's trying to open I gently pull up on the disc tray from underneath (like you're trying to open a window that's a little jammed) and this works every time. It will usually work a few times without having to do this and then it might get stuck again in which case I just yank up on the disc tray again while it trays to open and it becomes unstuck.
It's not perfect, but of all the methods I read about it to 'fix' this issue this is my fave because it's simple, easy, and effective.