Let's call the left side of this tirangle y and downside z.
3² + 6² = y²
y² = 45
y² + z² = (3 + x)²
45 + z² = 9 + 6x + x²
x² + 6² = z²
45 + x² + 6² = 9 + 6x + x²
45 + x² + 36 = 9 + 6x + x²
45 + 36 - 9 = 6x
72 = 6x
x = 12