What should you do if the person you like at work tried to talk to someone else?

Your question sounds like you're still emotionally a teenager if you are expending energy obsessing over whether "someone you like tried to talk to someone else." The right answer for an adult in this situation is to do nothing. If someone you like isn't behaving as if he/she is interested in you, then he probably doesn't, and you should get on with life. Plus, dating people at work is a risky move. The chances of it working out are very slim, and when it does fall through, what're you going to do then? Avoid them at work? Get another job? Is it really worth it?