Step-by-step explanation:
Momentum is conserved when there is no net external force. So momentum is conserved in the direction parallel to the incline.
p₀ = p
m v cos θ = (m + M) vₓ
vₓ = m v cos θ / (m + M)
After the collision, energy is conserved.
PE = KE
(m+M) gh = ½ (m+M) vₓ²
gh = ½ vₓ²
h = vₓ² / (2g)
d sin θ = [m v cos θ / (m + M)]² / (2g)
d = [m v cos θ / (m + M)]² / (2g sin θ)