1)
Why did they ask who should fight first?
1.
Ramban (Bereishis 19:8): They already decided that it is proper to fight. This was like a lottery to decide who will be first. No Shevet wanted to be first, or they all wanted to be first.
2)
Hashem said that Yehudah should be first. Why did they not succeed?
1.
Rashi: Yisrael did not ask whether or not they will win. At the end, they asked (verse 28), and Hashem's word was fulfilled.