The second constraint is the same as the objective function, so your problem boils down to finding integer solutions to
.. 3x1 +5x2 = 36
There are 3 solutions. They are (x1, x2) = (12, 0), (7, 3), (2, 6)
The value of the objective function there is (obviously) 36.
(2,0) it goes to the right twice but does not move upwards
Answer:

Step-by-step explanation:
The perimeter is two times width plus two times length:

There is no way to simplify further.