Is it , can you do this or should you do it ?
you can do anything , but ..........
most bathroom vents have a cap on the roof , this cap has a screen , you would not want it to get clogged with lint , and it will
for years bathroom vents just ran up into the attic and ended there , the problem was the little motors went bad and the motors would overheat , and burn, next thing you knew was you had an attic fire . so they started requiring an outside metal vent so if something did go wrong your house would not burn down
so your plan is to "t" the two together , so loose lint can fall down into a hot bathroom fan motor ! not cool !!
so if it was mine , i would disconect the bathroom vent , disconect the electric to the fan motor and run the vent into the hard vent pipe (NO , T CONNECTOR) go up on the roof and remove any screen in the cap and make sure the cap is big enough to handle the volume of air the dryer puts out
then in a month or so go back up and see how the vent is doing , any lint buildup ect.
the downside is you no longer have a bathroom vent and you need to keep an eye on that cap on the roof for lint buldup every so offten
if you ever list your house for sale , please put things back the way it should be , otherwise someone sometime will be talking about your "great handywork "