How should I adjust my W4 to prevent from owing state and federal taxes?

I have FT job and pension income from previous employer.