I think alexa is based on your site's traffic and as far as Page Rank is concerned it's based on the number of backlinks your site has. Alexa Traffic Rank shows your traffic rank in the whole internet site's database.
3 million Alexa and PR 5, thats great man. must have purchased links of good PR. Otherwise it will be difficult to get PR 5 and alexa 3 million. if you submit to only free sites and directories you wont have alexa 3 million.