You can get the answer to this problem at www.dofmaster.com
However, I can also give it to you in a nutshell here.
Making some reasonable assumptions for the unknowns, we will calculate the depth of field for the two cases. For lack of a better value, I will assume the flowers are about 1 foot from the camera. As bad as that guess might be, I think we can still find the answer to the problem.
For the 17 mm focal length with f/4, and a focal distance of 1 foot, the depth of field calculates to about 2 inches.
Conversely, for the 400 mm focal length with f/5.6, and the same 1 foot distance, the depth of field is zero.
Scary, isn't it? It sounds like the depth of field with the long lens will be so shallow for this scene that nothing will be in focus except some teensy slice of depth. Two inches was shallow enough, but zero - that's a bummer. Might as well forget using long lenses for close up work. Prove that to yourself by playing with the 400 at different distances. You can get reasonable depths of field, but only at much larger distances. In fact, you will get a two inch depth of field at a distance of 20 feet.