Answer:
Buenas tardes.
Step-by-step explanation:
The best expression to greet your teacher at 2 p.m. would be "buenas tardes" because it is used from 12 p.m. to 6 p.m. approximately. However, it depends on the country and it also depends on the season. For example, in Argentina and Chile the afternoon lasts until 7 p.m. in winter approximately and then, from 7 p.m. onwards everybody greets saying "buenas noches" and then, in summer, the night starts at 9 p.m.
-Buenos días means "good morning".
-Buenas tardes means "good afternoon".
-Buenas noches means "good evening".