No it does not matter if you were given a or b because with the equation a²+b²=c² as long as you can substitute in two values you can solve for the unknown value. For example if you had triangle STU having hypotenuse as 41 and value a as 9 you would substitute in the values resulting in the equation 9²+b²=41² then you would solve the exponents 81+b²=1681 then you would subtract 81 having the equation now as b²=1600 then you would √b²=√1600 resulting in
b=40
you could solve that equation the same way if you had b=40 and c=42