Let's say that:

So the odds of making a shot are:

The odds of making two shots are:

The odds of missing the first shot are:

Which means that:

Multiply both sides by to get:

Mutiply again:

Subtract 1 from both sides:

Use the quadratic equation:

Substitute:

Solve:

That gives that:

Since it can't be negative, we know that:

Remember:

Substitute:

Solve:

Round to get:

BUT CHECK MY ARITHMETIC