They are both the opposite of allow, but slightly different:
prohibit to make impossible, or stop, the opposite of favour
inhibit to restrict or help prevent, the opposite of aid, assist, help
It is prohibited to smoke indoors in a public place in the UK. (It is against the law to do so)
inhibit
The UK parliament decided to prohibit people from smoking indoors in public places.
the use of chemicals can inhibit mold growth (chemicals can prevent mold from growing/make it grow less quickly)