Oracle interview question

How to solve some basic problems