You must have 5 years of actual civilian creditable service to get a pension.
Like I said, your military buyback goes into effect after that 5 years is up. In your example, you do 5 years civilian service and if you buy back your military time, you would have 9 years retirement credit...