Test on functions such as grep and awk

Given a file (or array of string)
John 50 50
break
Jane 90 100
break

a. Please produce the following output using linux command
John 50 50
Jane 90 100
b. Please find the average of the numbers using linux command
John 50
Jane 95