If you're trying to teach an animal a trick and the animal has a maximum of 3 tricks and already knows 3, can you replace one of the old ones for a new trick? I can't find anyhting in the RAW about this, thanks!
It will depend on what you would consider "RAW". There are ton's of supplements for Pathfinder, both on the SRD and outside it. Per the core, there is not a way to do this that I can figure out.
You can, as suggested by Colin D, replace your animal, or discuss a way to replace one trick for another with your DM. As always, a DM have the powers to house-rule this, so check up with him.
You can however "Push" your animal to do some tricks that it doesn't know, as a higher-CD test. Look at this link for details on how to "push" an animal.