According to the document if you set limits manually, it would be more clear.
Refer below examples to know how it works:
The 1st argument gives expansion equal to multiplication by limit range.
ggplot(mpg, aes(displ, hwy)) +
geom_point() +
scale_x_continuous(limits = c(1, 7), expand = c(0.5, 0))
# Right most position will be 7 + (7-1) * 0.5 = 10
The 2nd argument gives the absolute expansion added to both end of the axis:
ggplot(mpg, aes(displ, hwy)) +
geom_point() +
scale_x_continuous(limits = c(1, 7), expand = c(0.5, 2))
# Right most position will be 7 + (7-1) * 0.5 + 2 = 12