I am not sure to understand what you are trying to do here, but there is for sure a better way, just by avoiding the iteration over all the rows. I would start by merging the 3 data frames on 'id' and then apply your score calculation. something like:
df = pd.merge(
left = pd.merge(
left= A,
right = B,
on = 'id'
),
right = C,
on = 'id')
df.apply(lambda x: fuzz.ratio(x['name_x'],x['name_y']),axis = 1)
Please provide with more details if you want a more detailed solution.