Thanks for replies. II think that easiest way to solve the problem of rotating of plate P2P2 will be using a mechanism like this:
To use it I should, join plate P1 with oneP1 to an additional plate with length of 10cm10 cm (height and width depends on the dimensions of element I found on google, I don't know it's name :) mechanism) like this:
After join of "unknown element" with P1 and after placing P2 on "unknown element", construction will look like this:
I still need to find way to prevent plate P2P2 from falling, I don't think that screws on "unknown element" will be enough to attach this mechanism to the plates.