New to coding

I am also new to Medium. This will be a learning experience on both fronts. For now, however I am presented with the following problem. And I do not yet have a solution:

But I will.