You shouldn't be happy about your friend failing at something.
Sandy was in a class with her best friend, Amy, and they studied together every night.
Sandy wanted to be at the top in her class.
Sandy offered to help Amy study harder for the test so Amy wouldn’t fail, for which Amy was very grateful.
When Amy almost failed her final text, Sandy was happy because Amy would not be a threat to her being the top student.
Sandy was happy for Amy when she got a B on the test so Amy hugged Sandy for her help and congratulated her on being #1.
Sandy couldn’t hide her giddiness and Amy was hurt by her joyfulness.