we have a truck in our game we have a rod against the wall of that truck, and we know the acceleration of truck when the rod start slipping... we just want to know what is acceleration of rod when it touch surface of truck.
To make the question more precise: there is a max static friction coefficient at points A and B. Calculating the perpendicular force at A and B is not hard, so the acceleration where it breaks loose is known. The acceleration increases exceeding this. So the stick starts to slide aft. Now you have a sliding friction, which would usually be modeled as a (lower) coefficient of the force on the surface. You want an equation for the height of A as a function of time. As the acceleration depends upon user input, it seems you want something for short timesteps. If we could give you delta A=f(acceleration,A,dA/dt previous step), would this meet your needs?
So the rod hits A=0. This is hard. One approach would be that it doesn't bounce, but has a certain (different?) sliding friction and continues to move aft. Another would be that it bounces with a certain recovery fraction, so dA/dt is -(some number times the previous) dA/dt, but there is no more friction at point A. The sliding friction at B continues unchanged.
It might even lose contact at A before hitting the deck. This shouldn't be too hard to detect.