Intersection method for two lines