These are the symptoms (what you experience):
- it becomes difficult to swing your lower leg forward as you stride, as if your knee is locking up
- the pain is localised either side of the knee
- the pain disappears when you start to go level or uphill
The temporary fix while you are out walking is one of these:
- put a smooth flat pebble inside each boot under the arch of the foot, preferably between the bottom of the boot inside and the insole
- put a very thick wad of gaffer tape in the same place
- sacrifice the insole from your companion's boots, cut out the bits that go under the arches of the feet, and put them in your own boots instead; your companion will have to soldier on without insoles
- it will probably not be fully effective
- it may cause blisters because of moving your foot to a new position in the boot
- to continue walking or running safely, the amount of lift must be adjusted accurately for your own feet and the way you walk, and not just guessed at as an emergency measure: this is specialist work needing a thorough understanding of biomechanics, and access to clinical orthopædic insoles
- there might also be something wrong with your knees which the pain caused by the flat feet is disguising: the physiotherapist will check your knees, too
The insoles don't last for ever: I have one pair which alternate between my hiking boots and my cross-country running shoes. After a year, they get downgraded into my everyday boots, and I get a new pair for hiking and cross-country running; the two-year old pair is given the deep six.
You must also keep the soles of your boots in good condition: get your boots resoled when they look about half worn out -- don't wait until they are down to the safe limit for grip.
There are exercises and yoga poses to help with fallen arches, but they are outside my area of expertise, so you will have to do your own research into them.
Whether your symptoms do or don't match the ones listed above, don't despair: go to the physiotherapist anyway, and you may have many years of happy hiking ahead of you.