Mathematical modeling of contact of two surfaces in the first order of tangency