1) Is it permissible to go to mixed gyms and one is in those part of the gym where there are no women? Would it be okay if it was two different floors?
Would it be okay to go and check at different times and if one sees it is empty, then train otherwise not go there?

2) And if one avoids looking but men and women pass by each other because of the placement of the dressing room?

1) Yes
2) It is fine