Are costs and fees the same thing in a contingency basis fee?

No.  An attorney’s fee in a contingency contract is a set percentage of whatever is recovered on behalf of the client.  The costs are litigation costs advanced to that client in order to process his or her claim, and those costs must be recovered separately from any fee.  A client always has the right to pay his or her own costs if preferred.