Here is one rather fiddly method.
library(ggplot2)
library(dplyr, warn.conflicts = FALSE)
DF <- data.frame(Year = rep(1995:2004, each = 2),
Country = rep(c("Mex", "Canada"), 10),
Value = rnorm(20, 5, 10))
Early <- DF %>% filter(Year <= 2000)
Late <- DF %>% filter(Year >= 2000)
ggplot(mapping = aes(Year, Value, color = Country, group = Country)) +
geom_line(linetype = 1, data = Early) + geom_line(linetype = 2, data = Late)

Created on 2020-09-26 by the reprex package (v0.3.0)