The first is sandifers syndrome... my LO suffers from these moments. And the second looks more like typical back arching.... The difference is here.
It is more likely to be typical 'back arching' though.... both are coursed by reflux. More than half of babies are born with some form of reflux... that they just grow out of. When babies are experiencing abdominal pain or discomfort, they will often arch their backs or draw up their legs, and become very upset. With reflux people assume they all 'spit-up', but not always, there is silent-reflux.... It could of course be just really bad wind, which also courses this discomfort.
Have you tried colief? or Infacol? I've heard some Mothers swear by them....
Weaning has been known to help reflux but I wouldn't advise before 6-months, so just alittle bit of cereal in her feeds can help keep it down. Sometimes it can make it worse, others think it is the best thing they ever did.... It is just trial and error.
If it is causing your LO and you alot of distress I would go see your doctor though.