I do not know whether that "it" is impersonal or not, but what I know for sure is that it is no good to use it
I think Kaplan
explains this case. There must be "so", meaning "doing this way"
I think Sergei refers to the last "it"
The first one looks OK to me, but the last one is definitely incorrect usage. It needs to be substituted with "so".