How to get a third line in shell??

In my script I was working with the first line's elements. After That I need to find lines which start with element of first line.

file=$1
target=$2
while read line
do
  if [ "$line" != "" ]
  then
    set $line
    if [ "$1" = "$target" ]
    then
    if [ "$2" = ":" ]
    then
        for i in $3 $4 $5 $6
        do
           if [ "$i" -nt "$1" ] 
           then
           for j in  cat $file //I dont know what to add here?????
           do                              I need to find $i in lines which begin with i
           if [$j = $i] 
           
               
           fi
           done 
    fi
  fi
fi
done< $file

Can you give some sample input and desired output?

juice apple table sofa // found my word it is sofa.Next step I need to find

sofa orange cuptea // this line, because it has SOFA, the same element ifound
pose glasses // in first line

Its still not clear. How do you know sofa is the world you like?

Closed it this seems to be homework