This project solves the guitar version of Scramble Squares although it can easily be modified to solve any of those puzzles of any size. Scrambe Squares has 4^9 * 9! combinations and far fewer solutions.
Each card side (Up, Left, Down, Right) has 1/2 of an image. These cards are classified in Cards.java as a Top (T) side and a Bottom (B) side. After this, the idea is to basically brute force the solution by grabbing cards, rotating them, and greedily appling cards to the card board until a solution that "fits" is found.
If you would like to use this to solve your game, you will need to be able to build this project yourself. Change Cards.java to match the cards you have. Each Card expects 4 sides to exist.