Put //pregunta in parenthesis. Change your XPath expressions to (//pregunta)[1]/@id, (//pregunta)[2]/@id ...

Without parenthesis e.g. //pregunta[4] evaluates to all pregunta elements which are at the fourth position of their parent element. 

However (//pregunta)[4] first calculates the sequence of all pregunta elements and then takes the fourth element of that sequence.

XPATH Selecting by position returns incoherent results
Once he transforms from his puny human form, how much does the Incredible Hulk weigh?
