The proper way to achieve what you are looking for is to
multiply length X by itself
multiply length Y by itself
add them together
then square root the result
this will give you the diagonal Y.
for example X is 2.35m multiply by itself = 5.5225m
Y is 3.75m multiply by...