De Anza College interview question

A basic algebra problem and a slightly more complicated one.