|It should be noted that this solution is not unique. I believe that there are a total of four solutions. A rather obvious solution is to swap the 5 3 that appear on the top with the 6 4 that appear on the bottom. Alternatively, you can flip all of the answers from left to right. Those combinations give you four solutions.
The important thing to recognize is that you need to place 1 and 8 in the middle of the boxes, since each only has one number that they cannot adjoin. If you place any other number in the center, one of the numbers will not fit. As a result, the middle row is completed almost immediately. The rest of the numbers can be filled in accordingly.