How are the bid and ask prices being derived on the options chain?

The options chain will always display the best offer at that point in time.

If you’re a buyer, you want to buy it at the lowest ask price. Thus, the ask price shown is the lowest ask price currently available.  

If you’re a seller, you want to sell at the highest bid price. Thus, the bid price shown is the highest bid price currently available.