Suppose that a qubit is in the state $|\varphi\rangle=a|0\rangle+\sqrt{1-a^2}|1\rangle$, where $a\in[-1,1]$.
If we first perform a standard basis measurement on this qubit and then perform a $\{|u\rangle,|u^\perp\rangle\}$-basis measurement, where $$|u\rangle=b|0\rangle+\sqrt{1-b^2}|1\rangle \text{ for some }b\in[-1,1],$$ what is the probability that the outcome of the second measurement is $|u\rangle$, in terms of $a$ and $b$?
Edit: I've found a solution, it should be $ab+\sqrt{(1−a^2)(1-b^2)}$.