This weekend I bought 2 long card boxes of magic cards for 5 dollars and now I am trying to sort them but it is proving difficult
Also is that a good deal?
It's an okay deal, I suppose. I'd say it's about even, since 1000 commons and uncommons is about 5-10 dollars, but the fact that you did not need to pay shipping probably pushed it over the top. Usually, the shipping is about 5 dollars, so it's pretty good even if you would get commons for free (I wish I was rich enough to throw away my limited pool after I finished with it, except for the rares).
As for how to sort them, organize them into Tier 1, cards you will and should always play in every deck that can support them, Tier 2, cards that could have synergy with the ones in Tier 1 and have potential power on their own, and Tier 3, cards you should never play unless there are some seriously freaked out circumstance. Tier 1 is usually rare, so I'm thinking you won't have to worry about that. But rare does not necessarily mean Tier 1. If you want to be hardcore, then do Tier 1.5, which is almost Tier 1, but not quite. A few examples;
Tier One: Dark Confidant, Any Two Mana Non-Glittering Wish, Teferi, Mage of Zhalfir, Mystical Teachings, Rite of Flame, Bogardan Hellkite, Char(+Almost every burn spell in Type 2 costing 2 or less)
Tier 1.5: Scryb Ranger, Spectral Force, Glare of Subdual, Tidings, Vesuvan Shapeshifter, Pact of Negation, Detrivore, Mystic Snake
Tier 2: Boros Swiftblade, Electrolyze, Golgari Grave-Troll, Aeon Chronicler, Radha, Hier to Keld, Commandeer, Soul Spike, Linessa Zephyr, Phyrexian Arena, UrzaTron, Sunhome, Fortress of the Legion
Tier 3: Craw Wurm, Thorn Elemental, Lightning Blast, Savra, Queen of the Golgari, Mindleech Mass, Golgari Rotwurm, Uktabi Drake, Sheltering Ancient (You get the idea. Cards that are obviously overcosted and/or bad)
Note that the card in Tier 2 aren't actually bad; they'll probably make up the backbone of most of your decks, but Tier One is cards that will be the basis, heart, if you will, of your decks; they're the focus you're looking to build around and abuse.
Next, you can never go wrong with color. After that, it doesn't really matter. You've done enough work. Stick them in the order that you're most likely to use them if you still have some energy, which is pretty rare amongst Magic players, or go alphabetical order if you're compulsive and you want to do something but...
Most of the time stacking multiples together is advised, though. It saves a lot of frustration.