The past tense of regular verbs is formed by adding -d or -ed. Hate (present tense) becomes hated (past tense), alter becomes altered, discombobulate becomes discombobulated. You get the picture. Verbs that do not end in -ed in the past tense are classified as irregular. Write (present tense) becomes wrote (past tense), tell becomes told and so on. The verb cost, meaning "to have a price of" or "to cause to lose something," is irregular. Its past tense is not costed; it's cost.
Ten gallons of gas cost about $35. (present tense)
A decade ago 10 gallons of gas cost about $15. (past tense)
Playing poorly cost the team a playoff spot. (present tense)
Last month's front-page error cost the editor his job. (past tense)
Make sure you read your work closely before it's published. If you don't, it may cost you.