AH - sorry been busy.
Not sure anyone has answered the when question.
You need to decide what your limiters are.
For me leg strength isn't the limiter so if I was doing weights it would be down the order of priority. In which case I would stick them where they had least impact on my most important sessions. Endurance doesn't seem to be a limiter for me either so speed and pace/endurance are my limiters. Therefore from a running persepctive my important sessions are intervals and tempos with the LSR in third place.The leg strength would be firmly last. Very similar for the bike.
So I would want to be most rested for the tempo/interval workouts and wouldn't do leg strength before these key workouts (same or previous day). I may however do it the day before a LSR.
However if double dipping on workouts the main focus for all of us is sport specific and therefore it would be the second workout of the day/session. The cardio gets the full treatment with the strength training getting what you have left.You don't get full benefit from the strength training but you get most of it. Reversing it wrecks the sport specific stuff which unless you are very weak (you are not) would be the wrong focus.
I generally ignore weight training for legs but do stick in a quick upper body workout post interval/tempo run. I would avoid doing this on a day when I was swimming the next day - but a leg strength session would be fine the day before a swim. Takes <15 minutes.
I superset everything. No breaks, no rest, and use a Push/Pull to work different body parts, so in theory the chest is resting from pressups whislt I do pull ups.3 sets of each pair
Seated Row/Miltary Press
Pull Ups/Pressups
Deadlift/Plank
So that is me: what about you?
You are a girl (a nice one but a girl all the same). Therefore you are not likely to have the same leg strength as a man, this is a general comment and I've never seen you do a leg press or a squat so can't comment directly. Therefore you may place more focus on strength training.
What are you other limiters? This will help you prioritise the other workouts and rank the strength training accordingly.
Hope this helps.
M.eface