This is a numerical-answer question. The correct answer is shown below.
[Solution by Dr. Abubacker] Perimeter $=\sqrt5+\sqrt{t^2+16}+\sqrt{(t-2)^2+9}$. The $t$-dependent part is convex, so the maximum is at an endpoint: $t=0$ gives $4+\sqrt{13}\approx7.6$ and $t=4$ gives $4\sqrt2+\sqrt{13}\approx9.3$, so $\alpha=4$. The minimum: reflect $A$ in $y=4$ to $(2,7)$; the line $B(0,0)\to(2,7)$ meets $y=4$ at $t=\frac87=\beta$. $6\alpha+21\beta=24+24=48$. Answer: 48.