The first step of an attack is declaring target. You select the target when you perform the attack.
Also, due to the wording (and in the ability) the melee and ranged attacks can be performed in the order of her choosing.
1) She spends an action to use Combat Mastery
2) She chooses which attack to perform first
2a) She performs the first attack, including declaring target
2b) She performs the second attack, including declaring target, the target must be different than the first attack. If that is not possible, the second attack cannot be performed.
Thank you! So it is possibile to attack the Trandoshian in that scenario during Combat Mastery.