Homework question about gas in a piston 
What happens when the gas heats up? Is it possible to determine the amount of gas by the amount the piston moves?
I think the "system" will move to the left (black arrow). Since pressure is defined as:
$P=\frac{F}{A}$ or $F=PA$
The left side has a larger area with the same pressure, $\vec{F}_{net}$ will be higher on the left than on the right. Therefore the "system" will move to the left.
Is my reasoning correct or am I missing something here.
Also, is it even possible to determine the amount of gas that is in this container by just measuring the amount that the piston moves when the system is heated up?
 A: Yes, you are correct, the system will move to the left.
If you add an amount of energy $\Delta E$ to the system, as you're heating up the gas, then the piston-container-piston system will move to the left a distance $\Delta x$, producing a work equivalent to $\Delta E$.
Since the work is force times distance, i.e. $W=F\cdot\Delta x$, you can find the force acting on the system and pushing to the left. But this force is related to the gas inside the container by the pressure law, i.e. $F=P\cdot A$, as you rightly stated.
Assuming you can measure $A$, the surface area of the larger piston, you can find $P$. Boyle's law tells you that, for a gas at constant temperature, $P\propto 1/V$. In fact, if you repeat the experiment twice, getting the gas to two different temperatures, you can write $P_1V_1=P_2V_2$.
In the end, you have:
$$V\propto 1/P\Longrightarrow V\propto \dfrac{\Delta x}{A\cdot\Delta E}$$
A: There's also another option that uses the equation of the ideal gas:
Let $l$ be the length of the rod, $A_1$ the surface of the big piston and $A_2$ the surface of the small piston.
We then have
$$V(x) = xA_2 + (l-x)A_1$$
where $x$ is the position of the small piston, starting at $x=0$ at the leftmost airtight position.
We also have 
$$V = \frac{NRT}{p} = xA_2 + (l-x)A_1$$
Because the pressure $p$ between the pistons must be equal to the surrounding pressure $p_0$ (otherwise there would be a net force due to the difference in piston sizes), this gives an equation for $x$ depending on $T$. Since $A_1>A_2$, it is decreasing with $T$, as you already expected.
