It's very difficult to give you a rule to follow. Often the choice of preposition is just a matter of learning which one applies in every situation!
For you sentence above,
The cost for - this gets used occassionally
The cost of - this is the usual choice
The cost on - no, this doesn't work