The first state would be the place to file for divorce since you lived there six months, then moved to another state, but moved back to the first state.  This would indicate that the first state is the state you intend to make your primary domicile.  Also, you did not satisfy the six month residency requirement in the second state and therefore would not be able to file for divorce in that second state.  You have now lived in the first state more than six months counting the original six months plus the time since you returned to that state.  Therefore, file your divorce in the first state.