HCSS interview question

Can you demonstrate how you would code this process?