If t and y are prime then the only factors of t*y are 1, t, y and t*y. So the only possibilities for b are b=t, b=y or b=t*y.
If b = t or y then 2b+1 will be a factor of n. So start by dividing n by 2b+1. If the answer is an integer then you have already factorised n.
If n/(2b+1) is not an integer then you know that b must be t*y. Since n-1 = 4t*y + 2(t+y) it follows that t+y = (1/2)(n-1-4b). Thus you now know t*y and t+y. But t and y are the roots of the quadratic equation . So all you have to do to determine t and y is to solve a quadratic equation.