In the first image, the picture shows three dimensions because it has layers of objects. The background consists of the screens and painting, the second level is the cup of paintbrushes, and the frontmost/lowest level has the keyboard and mouse. In addition, the layers overlap each other.
In the second picture, the image shows three dimensions because of perspective. Judging by the clarity of the image in certain places, the keys further away give the picture a sense of dimension.