That last equation doesn't make any sense, you said in the original problem that twin2 accelerates in an identical manner to twin1, so if twin1 accelerates for time BT then so should twin2. Also, are these times stated in the frame where the twins were originally at rest at the start? If so, in the rest of your calculations you don't even consider the new definition of simultaneity in the rest frame of O and O' after the acceleration, showing that you've missed the point entirely.
Anyway, the problem is easiest to consider if they both accelerate instantaneously. Suppose they are initially at rest in frame #1, both at position x=0 in this frame. Then at t=0, when both twins are aged 20, twin1 instantaneously accelerates to 0.6c, and continues at that velocity. After 10 years, twin2 accelerates to 0.6c in an identical manner.
So, twin1 accelerated at x=0,t=0 (age 20), and twin2 accelerated at x=0,t=10 (age 30). So, let's apply the Lorentz transformation to find when these acceleration events occurred in frame #2 which is moving at 0.6c relative to frame #1, where both twins come to rest after acceleration. The Lorentz transformation is:
x' = gamma*(x - vt)
t' = gamma*(t - vx/c^2) (and we can ignore the c if we use units where c=1, like light years and years).
gamma = 1/(1 - v^2/c^2)
So with v=0.6c, we have gamma=1.25. If we plug in x=0 and t=0 into the above transformation, we get back x'=0 and t'=0. If we plug in x=0 and t=10 into the above, we get:
x' = 1.25*(0 - 0.6*10) = -7.5
t' = 1.25*(10 - 0.6*0) = 12.5
So, in this frame--the frame where O and O' will be at rest after both twins have accelerated--twin 1 accelerated at x'=0, t'=0, after which twin 1 was at rest and twin 2 was moving at 0.6c, then twin 2 accelerated at x'=-7.5, t'=12.5, after which twin 2 was at rest. During the 12.5 years between twin 1 accelerating and twin 2 accelerating, twin 1 was at rest so he aged 12.5 years, while twin 2 was moving at 0.6c so he only aged 12.5*sqrt(1 - 0.6^2) = 12.5*0.8 = 10 years, so he was 2.5 years younger than twin 1 at the moment he accelerated. Then after twin 2 accelerated too, twin 2 was at rest as well, so they both aged at the same rate after that. Thus at all times after twin 2 accelerates, twin 2 is 2.5 years younger than twin 1 in this frame.