There *has* to be a better way to do this

Why can't I figure it out?