Here "heart" is a metonym that represents the mind or will. Alternate translation: "For it is with the mind that a person trusts and is right before God, and it is with the mouth that a person confesses so that God saves him" (See: [[rc://en/ta/man/translate/figs-metonymy]])