first of all, you can multiply or divide square roots just like normal numbers as long as you keep them square roots, so sqrt(48) is the same as sqrt(16) * sqrt(3).
Both of those methods use this idea to cut the large square root in to easier to handle smaller square roots.
On the left, the idea is to find square roots that are whole numbers. sqrt(16) is just 4 so you replace it with that.
On the right, the idea is the same, but you use the prime factorization first and then use the prime factors to look for ways to build up to a perfect square. Do you know what prime factorization is?