In the figure given below, PQR is a triangle with sides PQ=10, PR=17, QR=21. ABCD is a square inscribed in the triangle. I want to find perimeter of square ABCD that is to find the length of side AB. But by using of basic high school geometry concepts, not by trigonometry.
I have drop perpendicular to side QR, and by using heron's formula i found its length 8. but i am confused what to do next. So, please help me.
Any other solutions are expected with above limitation(to use basic high school concepts not by trignometry)
THANKS...............

Let $AB=x$. Then the area of trapezoid $QABR=\dfrac{x(21+x)}2$. The area of triangle $ABP=\dfrac{x(8-x)}2$. The sum of these is the area of the whole triangle, which you have already calculated. Solve for x.
EDIT: More simply, note that since the little triangle ABP is similar to the whole triangle, it's base, $AB=\dfrac{21(8-x)}8$. So set this equal to x and solve.