If I read your question correctly your landlord has sent you notice that he is in default on his mortgage and the bank is foreclosing on the property.
As a tenant in SF you have many rights that you wouldn't have in other areas. Contact the rent board to know what those are.
Now for you to be able to buy the property you would need to qaulify for a new loan and be able to afford the paymnets. Sounds like a duh but obviously your landlord didin't do that and the lending criteria has changed.
The owner owes money to a bank, he hasn't been making payments and the bank is goiing to sell the property to recover the money. If the property isn't worth what is owed, the bank will not get all the money back. They will come up short. That's a short sale. If you want to buy at the lower market price you make the offer to the owner and he then asks the bank to accept the lower amount.
If the owner can pay the missed payments and get enough for the property to pay off all that he owes obvioulsy everyone will be happier. But here's the rub. It costs about 10% of the sale price to sell and the owner might not have that much equity or other liquid assets to cover the costs. (transfer tax and brokerage fees).
At auction the bank usually bids the loan amount first and then others can come in. Many times the auction is unsuccsful and the property will then be listed and sold as an REO (real estate owned) basically bank owned property.
If you want to proceed get a Realtor to help you determine the value and negotiate with the owner and the bank. But remember to continue to pay your rent or you will be evicted with just cause.