Worked on Problem 2

working on friends of friends function