It is best to avoid long vent runs and even better to avoid cutting a hole in your roof.
I suggest that you vent through an exterior wall if possible. This goes for both the bathroom vent and dryer vent. Yes, you will need separate ducts and vents for the dryer and the bathroom. The bathroom vent will have a fan and the dryer vent will not.
If you cannot vent through an exterior wall, you can vent both through the roof.