Yes you can. You are using Chasles' Relation. And even if it wasn't a right angled triangle you could say it.