Magnetic phase transition and magnetic properties in rare-earth-based RAl3C3 layered carbides