If every meter costs 2 dollars, then 5 meter would cost 10 dollars and 7 meter would cost 14 dollar. Now we take a number when subtracted from 10, we get 5 dollar and when the same number subtracted from 14 we get 1 dollar left. Now if we take 15 dollar, you'll see that when you subtract 10 from it you get 5 dollar and when you subtract 14 from it you get 1 dollar. Therefore 15 satisfies the given condition in the question.