from A) itself you can get the answer for B),
in general let's take the diagonal of a square is and a side of a square is , then the relationship between these two components can be expressed from the pythogoras theorem,
(since p, q are positive)
now substitute A with p or q according to the question asked
use the same theory to find the area of the triangle, for that you'll have to draw a line from one corner of the triangle which is perpendicular to the side which is facing that corner.