I've been preparing for a competition and there is this problem that I cannot solve. Can you please help me and also tell me how to do similar problems if they appear in the future?
Problem:

I've been preparing for a competition and there is this problem that I cannot solve. Can you please help me and also tell me how to do similar problems if they appear in the future?
Problem:

Copyright © 2021 JogjaFile Inc.
I am unsure what the "general procedure" should be for this kind of problem, but I can help for this specific one.
Note that for the $5\times 5$ square shown, there are $12$ black squares. Since none of the black squares are neighbors, we know that the minimum number of moves to take the starting configuration to the final configuration is at least $12$. Thus, if we can demonstrate a sequence of moves of length $12$ which accomplishes our goal, we will have proven that the minimum is exactly $12$.
SPOILERS AHEAD!