e 13 8 151

The total mass on the right side is the mass per unit length (\lambda)
times the length: m_{R}=\lambda x. The mass on the left side is
m_{L}=\lambda(L-x). 
a=\frac{m_{R}-m_{L}}{m_{R}+m_{L}}g=\frac{\lambda x-\lambda(L-x)}{\lambda x+\lambda(L-x)}g=\frac{2x-L}{L}g.
The acceleration is in the direction of the side of length x, if x>L/2.