Mostly your problem was misplaces parens: too many ) here:
(let ((tmp (car kill-ring))))
Use paren-mode to see which parens balances which parens.
Standard function kill-new replaces the head of the kill-ring if you give it a second arg of non-nil. So (kill-new "xxx" t) replaces the head of the kill-ring with xxx.
So try this:
(defun foo ()