A PCIe Gen 3 card should work in Gen 1 slots but the performance of the GPU will take a hit.
The P5B: What is that? Gen 1 PCIe? I think so. The RX 580 is Gen 3. It should work but the hair splitting is in the word "work". It should slot in and put an image on your screen. However, Gen 1 bandwidth is several magnitudes slower than Gen 3. Will it work? I think so. Will you get the full performance? I think not.