How to find the Thevenin resistance?
There are two ways to find Thevenin's resistence. The first one is how are you doing, trying to find the equivalente circuit saw by R1 resistance (just short circuit all independent voltage source and open circuit all independen current source).

In your case, it is not easy to see the equivalent circuit saw by A and B terminal, so let us try the second way.

The second way is, from your original circuit, make a short circuit between terminals A and B (i.e. a short circuit between the terminal over the R1 resistor), and calculate the short circuit current (Isc) that pass between those terminals. The Thevenin's resistance will be:

$$
R_{th} = \frac{V_{th}}{I_{sc}}
$$

EDITED:

I really did not understand what you have commented, so I'll try to explain a bit better what I have said.

To calculate Thevenin equivalence from this circuit:







simulate this circuit &ndash; Schematic created using CircuitLab

You calculate Vth and Isc

$$
V_{th} = 40 + I_2 * 40 + I_1 * 20
$$
where
$$
I_1 = \frac{
\begin{vmatrix}
 60 &amp; -20 \\
 -20 &amp; 80
\end{vmatrix}}{
\begin{vmatrix}
 120 &amp; -20 \\
 -20 &amp; 80
\end{vmatrix}}
= 0.4783 ~A
$$
$$
I_2 = \frac{
\begin{vmatrix}
 120 &amp; 60 \\
 -20 &amp; -20
\end{vmatrix}}{
\begin{vmatrix}
 120 &amp; -20 \\
 -20 &amp; 80
\end{vmatrix}}
= -0.1304 ~A
$$
So,
$$
V_{th} = 44.35 ~V
$$

To calculate Isc, just short circuit terminals A and B, and calculate Isc







simulate this circuit

$$
I_{sc} = \frac{
\begin{vmatrix}
 120 &amp; -20 &amp; 60 \\
 -20 &amp; 80 &amp; -20 \\
 -20 &amp; -40 &amp; 40
\end{vmatrix}}{
\begin{vmatrix}
 120 &amp; -20 &amp; -20 \\
 -20 &amp; 80 &amp; -40 \\
 -20 &amp; -40 &amp; 60
\end{vmatrix}}
= 1.3784 ~A
$$

In this way:
$$
R_{th} = \frac{44.35}{1.3784} = 32.1755 ~ohm
$$

Sorry to solve your exercise, but I didn't find another way to explain this.