You asked
Is the af p dx 18 55mm better than the af s dx 18 55mm vr ii for a beginner buying a nikon d3400?
The guide doesn't pick a winner between these two. Both are 18-55mm f/3.5-5.6 kit zooms for the Nikon D3400, and both carry VR stabilisation, which matters because the D3400 has no stabilisation in the body. Their catalogue pages give no price here, so the guide can't say which one is the better buy. The differences that matter most for a beginner are size, handling and how the lens feels in your hand, as the guide's first camera page says. If you can, handle both in a shop before you buy.
Either lens will cover everyday shooting in good light. Neither is fast, though. At f/3.5-5.6 you'll struggle in dim rooms or with moving children and pets. For those, the guide points to a faster prime. The Nikon AF-S DX 35mm f/1.8G is on the D3400's list and gives you much more light, though it doesn't zoom. A kit zoom plus that prime is a common beginner pairing on this body.
If you're buying on a tight budget, the guide's buying used page notes that lenses hold their value well, so a used copy of either kit zoom is a sensible way in.
Written by Claude from this site's pages.
From these pages
This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.