Supercongruences arising from certain identities