how to solve this problem as the follow photo? 