Leave the dry hops in for about 7 days (most american IPAs ive seen do this). If you leave them for longer than two weeks you will get some grassy flavor from leaving it on the hops too long. That being said, I've had beer that was dry hopped for three months that was excellent, so it depends what you want.
I highly recommend bagging your hops in the nylon bags. You'll have a mess when you go to rack to bottles/keg if you dont. weigh the bags down with a handful of glass marbles so they dont just float on the top for a week. Sanitize the bag and marbles.
I personally bag my hops with marbles, place them in a secondary, and rack the beer on to it. I always wait until primary fermentation is complete for this, 2-3 weeks. check your numbers and all. Plenty of guys on here dry hop in primary, so you can do that too, and save the effort of racking to the secondary.