Read two file and compare the line

Hello Guys
I need to read and compare two file, one file contains hostname, and others contain hostname and IP@,
and the objective is to read each file and compare if line in file1 equal to first word in the second file2

file1

file2

this is my first code

fqdn_hosts=list.txt
named_hosts=infra.hosts

for line in `cat $fqdn_hosts`
do
        for line2 in `cat $named_hosts`
        do
                if $line -eq $line2 | awk -F: '{print $1}'
                then
                        echo $line   '$line2 | awk -F: '{print $4}''
                fi
        done
done

can you help me, please

Can you post expected output?

And post current output...
There are a lot of debugging to do e.g. what do you expect from: `cat $fqdn_hosts` ?
Here:

if $line -eq $line2 |...

What is the meaning of -eq ? So is it appropriate?etc... what is being compared? what is the second variable? etc...