This is a complicated question because of the relationships involved. To protect yourself, first - get a clear read on what the property - in its current condition - is actually worth on this market. Make sure that paying him $50,000 makes financial sense given the value. Second, get clear on what is legally involved with co-ownership with a friend; I wrote a column about this exact issue not long ago - here's the link:
Finally, sit quietly with yourself and try to understand how your friend ended up in this situation. Sometimes, but not always, people have a habit of not handling their business in a buttoned up way - get clear on whether your friend has a pattern of this sort of thing that might warrant caution before doing a transaction with her.
Also, get clear on the agreement between you and your friend. Are you looking for any upside from helping her with this? Understand that if you go on a mortgage with her - whether or not you go on title with her as well - YOU are jointly and severally liable for the mortgage, until the home is sold or refinanced out of your name. That is, your friend could die, become disabled, or just desert the scene, and you would still be responsible for paying the mortgage. If she falls on hard times and can't or doesn't pay the property taxes - the County will come after you for them. If that is not okay with you, then you might not want to do this transaction.
With respect to first time homebuyers' programs, the City of Berkeley doesn't really offer anything helpful for your situation. If you work for the University or the City or anything like that, check with your HR departments re: whether there are any programs of that sort that can help. You may be eligible for a low-down payment/loan-to-value loan through the FHA or CalHFA, but that depends on a number of factors. I would definitely talk with a reputable, ethical mortgage broker to get more info - if you need a name and number, drop me a line - I'd be happy to make a referral!