
Randall K. answered 09/04/20
Retired College Instructor and High School Teacher tutors online
This is an example of Subjunctive 1: 'koste es' means 'if it costs'. The Subjunctive 1 expresses unreal or hypothetical situations.
It might confuse you because 'es koste' looks like a first year error. You may ask, "Isn't it 'ich koste' and 'es kostet'?" Yes, but that's the Indicative mood. It expresses things that are actually happening, not unreal or hypothetical situations.
This form also appears in newspaper accounts where the reporter doesn't want to assert that something is absolutely true.