Your close I'll give you the cases in the function you give and an argument too sum, and how to setup the sum call.
You can set up up recursively, with a a recursive function defined instead of f and calling it where sum it.
(define (simpsons-rule f a b n)
(define h (/ (- b a) n))
(define Y_k (lambda (k) (f (+ a (* k h)))))
(define (f x)
(cond ((or (= x 0) (= x n)) ...)
((even? x) ...)
(else ...)))
(* (/ h 3)
(sum f 0 plus1 n)))