I read that cayenne pepper is meant to be moderately hot while red pepper is very hot. At the same time from the pictures it seems cayenne pepper is a red pepper. I'm confused please clarify.
The entire world is confused by what type of 'pepper' anything generally called a chilli actually is.
Farmers may know exactly what cultivar they are growing; supermarket or food production/processing buyers may only care about what family it belongs to.
By the time it reaches the supermarket shelf, it's anyone's guess.
Cayenne is already a family of chillies, not one single type. That's further confused by the fact that much 'cayenne chilli powder' sold is actually made from a blend which may not even contain any cayenne specificaly. Many are made from piri-piri.
Something sold as 'hot chilli powder' right next to one sold as 'cayenne powder' may even be the same blend, via a different importer.
That's even if we exclude the ones marked 'chilli powder' that actually turn out to be a blend of herbs & spices for making chilli con carne.
Further confusion… 'red pepper' is a very very vague description to start with.
In the UK a red pepper is a bell pepper, not even a chilli.
Many supermarkets use such descriptions even on fresh chillies, where someone, somewhere, ought to know the precise type. But no, we get to buy 'finger chillies' or 'red chillies' or green chillies… even if you can see it looks like a fresno, you don't know if it really is. Some 'specials', like padron, scotch bonnet or bird's eye might be labelled properly, the rest is a bit of a guess with a "heat index" on the side of the pack with 1 - 5 pictures of a chilli to aid your choice.
To add more confusion - padron peppers. 9 out of 10 are mild… one is hot. You don't know til you eat it.
If you see something as a powder labelled 'red pepper' then unless you can extract further information from the ingredients list [if there is one] then you really have no idea what you may be buying.
It could be paprika, almost zero heat, New Mexico or Kashmiri mirch, which have a little heat but a lot of colour, or right up to Naga, Habanero or California Reaper. You really cannot tell until you smell it or taste it.