Both authors refer to different levels of human needs. According to Maslow represented them in a pyramid named "Maslow Hierarchy of Needs.In his pyramidal representation, you need to fulfill the levels from the bottom to the top. In this case, by completing the levels, a human can achieve self-actualization. Here Maslow refers to the lowest level or the physiological needs such as air, water, food, shelter, sleep, clothing, reproduction and without these, a human wont be able to focus on other aspects of his life, as he needs these to survive. When having an empty stomach, the only thing you can think of is eating and you will put all you efford into getting food.
Dostoevsky says that although someone can fulfill his basic needs and climb trough this pyramid, without some goals in his life, the human would feel empty. This is what is expressed when people say "money doesn't buy happiness". Humans need something to live for as we know we are finite and our existense will come to an end.