The English foot comes from the Indo-European root *ped. Think pedal.
Interestingly, the “p” sound consistently transformed into an “f” in the Germanic languages — but remained a “p” in the Latinate languages.
This is why, foot is equivalent to pie.
Other examples of this pattern include father and padre, and the English far is from the same root as the Latin per.
The relation between “five” in Spanish (cinco) and English is one of the more surprising relationships: they are indeed direct second cousins!
Both come from the same Proto-Indo-European root, *penkwe, meaning the same, five. (The greek for five also comes from the same: think about pentagon, for example).
The interesting part is this: the p- sound in Proto-Indo-European evolved into the Germanic and then English f- sound. Think about father and padre, for example or foot and pie. Five and cinco follow this pattern too, but in a more subtle way.
The Proto-Indo-European for the same, *penkwe, evolved into the Latin word for “five”: quinque. The qu- was pronounced in a hard way like a k- and then, as Latin evolved into Spanish, the k- was softened into the soft c- in cinco. So p- to k- to c-. You can see it through the similar sounds.
Indeed, the pattern is most obvious in the repetition of the sounds in both works cin-co as the c/k sound twice, at the start of each syllable. And the fi-ve as the f- sound (and its closely related, usually identical and often interchangeable sound of v-) at the start of each of its syllables as well.
The Spanish pegar (“to paste”) comes from the Latin pix, meaning “tar.” That makes sense: “paste” looks like just a more diluated “tar.”
But pix itself comes from the Proto-Indo-European root pei(e), which meant, fat — think of animal fat, for example. It makes sense that this word evolved into a word meaning “tar”: that’s a bit what animal fat looks like.
From this same root pei(e), we get a few notable English words: