Think about how you solve systems of algebraic equations. If you have three equations in three unknowns, say, x, y, and z. You would add or subtract a multiple of one equation from a multiple of another to eliminate one unknown at a time. In the first problem we have two "unknowns", A and B, we want to eliminate. So we need three equations! We already have one equation so we need two more. We get those by differentiating!
In the first problem you have \(\displaystyle y= Ae^x+ Be^{2x}+ \frac{1}{2}e^{-x}\). Since this has to do with differential equations, start by differentiating!
\(\displaystyle y'= Ae^x+ 2Be^{2x}- \frac{1}{2}e^{-x}\)
\(\displaystyle y''= Ae^x+ 4Be^{2x}+ \frac{1}{2}e^{-x}\).
Now eliminate A and B from those three equations. The first thing I notice is that all three equations contain \(\displaystyle Ae^x\). Subtracting the y' equation from the y'' equation eliminates A: \(\displaystyle y''- y'= 2Be^x+ e^{-x}\). Subtracting the y equation from the y'' equation also eliminates A: \(\displaystyle y''- y= 3Be^{2x}.
Now we have \(\displaystyle y''- y'= 2Be^x+ e^{-x}\) and \(\displaystyle y''- y= 3Be^{2x}\). We can eliminate B by subtracting 3 times the first of those equations from 2 times the second. \(\displaystyle 3y''- 3y'- 2y''+ 2y= y''- 3y'+ 2y= 3e^{-x}\)
The second problem, \(\displaystyle y^2= 4C(x+ C)= 4Cx+ 4C^2\) has only one constant so we only need one more equation. Differentiating, \(\displaystyle 2yy'= 4C\). Okay, it's a little harder to see how we can (elegantly) eliminate C from those two equations so I would try "brute force". From \(\displaystyle 2yy'= 4C\) we have \(\displaystyle C= \frac{yy'}{2}\). Replace C in the first equation by that: \(\displaystyle y^2= 2xyy'+ y^2(y')^2\).\)