solve square difference