Your code gives the right answer for the wrong reason. apply() will use the chosen function on each column (or row), so you are finding the max of the year column and the max of the pop column. In this case, the highest value for year is 2007, which is the last year in the data set, so it also happens to be the year with the highest population. There is no reason to use apply() for this exercise.
My suggestion is to use which.max(pop), which identifies the row (by number) with the highest value of pop. If you need to use base R, this code would work
library(gapminder)
korea <- gapminder[gapminder$country == "Korea, Rep.", c("year", "pop")]
korea[which.max(korea$pop), ]
#> # A tibble: 1 x 2
#> year pop
#> <int> <int>
#> 1 2007 49044790
Created on 2019-12-13 by the reprex package (v0.3.0)
If you can use the tidyverse, this code would also work
library(dplyr)
library(gapminder)
gapminder %>%
filter(country == "Korea, Rep.") %>%
select(year, pop) %>%
slice(which.max(pop))
#> # A tibble: 1 x 2
#> year pop
#> <int> <int>
#> 1 2007 49044790
Created on 2019-12-13 by the reprex package (v0.3.0)