“spirit of the ruler.” In this context, “spirit” refers to his attitude or mindset. In this case, the ruler becomes angry or upset with you. [For more on the use of “spirit,” see Appendix 6, “Usages of ‘Spirit’”].
“leave your place.” That is, abandon your place or position. Leaving “your place” refers to physically leaving the scene, but it extends to not giving up the position you have taken on a subject, but be calm, because that can open the door for the ruler to change his attitude and even his ideas. The author is playing with the verb, because “leave” and “rest” are the same word, “leave” is second person (referring to “you”) and rest is third person (the subject is “calmness”), and both verbs are hithel imperfect. The idea is do not abandon your position, let the calmness do the work.
“for calmness lays great offenses to rest.” This is quite similar to Proverbs 15:1, that a “soft” answer turns away wrath. The Hebrew is “lays great sins to rest,” where “sins” is the cause, which is put by metonymy of the cause for the effect. The cause was sin, but the effect that is laid to rest is an “offense.”