Small script. Don't know if invoking firefox this way will do what you want; play with it if it doesn't.
#!/usr/bin/env ksh
grep John remotecomputers.txt | head - 1 | read junk ip junk
nxt_ip="${ip%.*}.$(( ${ip##*.} + 1 ))"
firefox "http://$ip"
firefox "http://$nxt_ip"
The "shell magic":
${ip%.*} # delete the shortest string .* from the contents of the variable as it is expanded
${ip##*.} # delete the longest string *. from the contents of the variable as it is expanded
$(( expr )) # compute the expression in the double parens
The code assumes that the lines in the input file have the IP address as the second token, something like:
John 192.16.18.1 some comments or junk
It will also only use the first line that matches in the input file.