The man is quoting what Moses wrote in the law.
"and love your neighbor as much as you love yourself"