Since second element of tuple is key used to sort, reverse the tuples and create a dict and use it for lookup.
Minor assumption: This code will only produce correct results if the number of elements in the list1 and list2 are same.
Code:
list1 = [('ST00003', '009830'), ('ST00003', '005490'), ('ST00003', '005830'), ('ST00003', '251270'), ('ST00002', '111710')]
list2 = ['111710', '005830', '009830', '005490', '251270']
# desired list3 = [('ST00002', '111710'), ('ST00003', '005830'), ('ST00003', '009830'), ('ST00003', '005490'), ('ST00003', '251270')]
list1_rev_tuples = [(ele[1], ele[0]) for ele in list1]
dct = dict(list1_rev_tuples)
print(dct)
list3 = [(dct[ele], ele) for ele in list2]
print(list3)
Output:
{'009830': 'ST00003', '005490': 'ST00003', '005830': 'ST00003', '251270': 'ST00003', '111710': 'ST00002'}
[('ST00002', '111710'), ('ST00003', '005830'), ('ST00003', '009830'), ('ST00003', '005490'), ('ST00003', '251270')]