Hi Surya, you have already got the work done. The web elements are already loacted and made a list iterator here:
List<WebElement> professors = driver.findElements(By.className("tile-consultation"));
ListIterator<WebElement> theListOfProfessors = professors.listIterator();
The findElements method will return a collection of elements that match with the selector. There is no need for you to retrieve the elements again like you are trying to using this driver.findElement(By.cssSelector(".tile-consultation:nth-of-type(x)" inside that loop. You merely need to iterate over the list iterator theListOfProfessors that you have already created. E.g. something to the effect of
while(theListOfProfessors.hasNext()) {
WebElement elem = theListOfProfessors.next()
// do something with element
}
Hope this was helpful!