once you have itunes 10.5 beta 7 (beta 9 is osx only) you need to obtain a copy of the ios5 restore file make sure its the .ipsw file. Google is your friend its out there.
once its downloaded open itunes and plug in your phone.
Select your iphone on the left pane.
press and hold shift...