Digital doubts from part1 lecture home work problem

How to solve?