According to the question, in the first condition U1=21kx12 ...(i)
In the second condition, U2=21k(x1+x2)2 ...(ii)
Increment in the potential energy =U2−U1 =21k(x1+x2)2−21kx12 =21k(x12+x22+2x1x2)−21kx12 =21k(x12+x22+2x1x2−x12) =21k[2x1x2+x22] =21kx2(x2+2x1)