This has been answer at least a couple of times each day. With 3GS and IPhone 4, only way to downgrade is to have your SHSH hashes saved, Cydia or your computer, for each firmware you want to downgrade to. If you don't know what SHSH hashes are, google and read up. In short, if you don't have them saved, for example 3.1.3, you won't be able to install that firmware, ie 3.1.3.
To save SHSH or see what you have saved, run Tinyumbrella:
1) Make sure you Iphone is detected.
2) check "Advanced Options."
3) In new window, under "Device / Version," select whatever firmware you wish to try to save.
4) Click on "Save my SHSH." Pray Cydia has them. If you don't get an error, the SHSH hash was saved onto your computer.
5) Repeat to save other firmware hashes.
6) Now, click on "Display SHSHs." It should listed all hashes you have saved onto your computer.