At least when the ground state of the molecule is a singlet state, the first one is correct, and the second one is wrong. Note that when $S_0$ is the ground state of the molecule, a triplet ground state calculation, such as from the following input file
#p b3lyp/6-31G* opt
title
0 3
<geometry>
actually calculates the $T_1$ state, because in this case the lowest triplet state is $T_1$, not $T_0$ (which does not exist). Therefore, your second input file calculates the first triplet state that is above the triplet ground state, i.e. it calculates $T_2$.
An immediate follow-up question is: should you use your first input file or the input file that I just mentioned, given that both calculate the $T_1$ state? Actually, when the exact functional and an infinite basis set are used, the two calculations are equivalent. So the best choice is the one that provides the best cost/performance ratio for approximate functionals. Specifically:
- Use your first input file when your $S_0$ state is single-referential and your $T_1$ state is multireferential. Only by this way can you have a single-referential reference state, and minimize errors due to static correlation.
- Use my input file when either (1) your $T_1$ state is single-referential and your $S_0$ state is multireferential; (2) your $S_0$ state has a triplet instability or a near triplet instability; (3) your $T_1$ state has significant charge-transfer character, but for some reason you have to use B3LYP which is known to perform poorly for charge transfer excitations; or (4) your $T_1$ state has significant double excitation character when viewed from a $S_0$ reference. Either one of these four situations make the linear response TDDFT calculation of $T_1$ unreliable, or at least much less reliable than it would otherwise be.
- When the two methods are equally good in terms of accuracy, use my input file, since it is computationally faster.