Solving a Soma Cube

Are you asking how to create an animation form zero in Grasshopper?

Use Google and search for other topics on this forum and while you are at it watch some tutorials.

There is an upcoming course for animating in GH.

Having said that, Rhino and Gh are not animation software. But probably it will be enough for what you need.