I always reccomend building from source and installing to /usr/local. You can run two versions side-by-side as long as you remember which version you're running.
You don't mention which method your using, but we'll assume Apache with MODPHP.
It should be a simple case of going to php.museum.net and finding the version you need, then, something like the following (top of my head, no checking):
cd /usr/src
wget http://museum.php.net/php5/php-5.2.13.tar.gz
tar -xzvf php-5.2.13.tar.gz
cd php-5.2.13.tar.gz
The next line will let you find out what the build command was for your previous install, so you'll know what extensions you've got enabled. As you're already installed, you should have no problems with dependancies.
php -i | grep configure
Re-create the configure line, and the only changes you should need to make are adding a new prefix
./configure --prefix=/usr/local/php-5.2.13 <rest of configure as above>
then make & make install
Then you've just got to edit your apache httpd.conf file to point to the new location of libphp5 (just search and replace). You'll also find it helpful to sym link the new php location to something that won't change when you upgrade in future:
ln -s /usr/local/php-5.2.13 /usr/local/php
Now, your custom built version of php will always be in /usr/local/php as when you build php-5.3.5 you can change the symlink.
All that's left would be to re-install any PECL/PEAR extensions, using the full path to the binary /usr/local/php/bin/pear install <whatever> and copying the php.ini file you're currently using to the new location /usr/local/php/lib/php.ini
Now, you're no longer tied to the distribution packaged version of php, you can re-compile as required to add extensions, and, you're not reliant on third party to create packages for you.
It's more than likely that the old system package will still be in the path, you either need to remember this, and call the full path to the new php, or modify the relevant section of your system path to include the new version before the old.
Andrew