Haha, I'm glad I actually looked at it again, anyway, I made a mistake in my calculations and it is indeed 10 in the end, damn. I'll just explain my way of thinking then:
My 2nd picture, the point C is on the line and X is a variable. Length function is \(\sqrt{36+x^2} + \sqrt{36+(2-x)^2}\).
With the help of derivatives I found that its lowest value is \(2*\sqrt{37}\) when X = 1 (although one could also apply some common sense there since if u try drawing the thing abit differently - as a double-rectangular figure omitting the folding, the shortest distance ends up being a straight line and it happens that since the rectangles have equal lengths, the line will cross the folding in its middle thus X = 1). \(2*\sqrt{37}\) > 12.
First picture is similar. Length function is \(F(x) = \sqrt{x^2+4} + \sqrt{36+(6-x)^2}\).
In order to find minimum value I went with the rule that this \(X_0\) is pretty much a root of an equation \(F'(X_0) = 0\)
\(\frac{2*x}{\sqrt{x^2+4}} - \frac{2*(6-x)}{\sqrt{36+(6-x)^2}} = 0\)
\(x* \sqrt{36+(6-x)^2} = (6-x)* \sqrt{4+x^2}\)
solving this you get x = 1,5 as the only fitting answer, y ends up being 10 which is the answer to the question