One of the things I studied in college and graduate school was linguistics--the science of how language operates.
Certain sounds are related because they are produced in the same part of the mouth--for instance s and z, d and t.
P and F are also related. P is a "stop", meaning the air path is momentarily closed and F is a fricative, meaning the air path is restricted but not totally stopped.
Also, vowels routinely morph.
So K-[vowel]-F-[vowel] in Arabic and K-[vowel]-P-[vowel] in Hebrew would be because they are related. Like Aramaic, Syriac, and Akkadian, both are Semitic languages descended from a common source language.