07 Pontiac g5 gt

My ilde keeps going up then back down this real happens when the R.P.M.go above 2500 as I’m coming 2 a red light or just stopping. Plus it ilde real ruff when I have th a/c on.