The maximum distance to the vent is based on the diameter of the drain line. It is 5' for a 2" drain line, but it appears both your tub and sink lines are smaller, and thus, would need to be closer. Plus, EACH of the two fixtures need their own vent line, although, they can be combined, if done properly, so you only need one line up through the roof.
The trap arm, prior to the drain going down is where the vent must come off within the prescribed distance. The distance to that vent in the corner is somewhat irrelevant, if the lines are run properly - i.e., the vent going vertical within the prescribed distance. Once it has done that, it can go horizontal to get where it needs to go to connect with the main vent stack as long as you maintain at least the 1/4"/foot slope. The vent line for the tub must go up at least 6" above the flood rim of anything else connected to the drains in the area, in this case, the highest one is the sink, 42" above the floor is a safe bet in most circumstances that the vent must go up before it can be combined with any others. In an older house, it's not uncommon to have S-traps, and those are not allowed today.