Hexaware Technologies Interview Question

Two questions about some random puzzles