How do you propose to keep the input in three columns? Change the line endings inside $c to some other character, or repeat the fields from a and b for each line in $c?
Your awk script doesn't know about the shell's $c variable, they are not automatically communicated between the shell and awk so you need to do that somehow. However, the obvious solution fails to fix the problem with the multi-line output from $c.
Whatever which way you take, you should preformat your 2nd file with sed or awk so that everything that should be in a single row, is a single row. Then just use what era posted. If it is a simple pasting of files together, you can also use paste, but since you used egrep in your example, I guess "join" might be an option too.